aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/static.zc
blob: 1b792dc89d6e8d95179733c4290451c37ef36d95 (plain) (blame)
1
2
3
4
5
namespace;
include rt;

struct Str { int len; static fn size(s) { return s * 2; } static fn none() { return 5; } fn get() { return this.len; } }
int main() { Str a; a.len = 9; rt.put_n(Str.size(7)); rt.put_c(32); rt.put_n(Str.none()); rt.put_c(32); rt.put_n(a.get()); rt.put_c(10); return 0; }