aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/member_method_call.zc
blob: cc44c626b51ab32405edd94df8ee5f4e78f1b86a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
// expect: 7/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
struct acc { int total; fn add(n) { this.total = this.total + n; return this.total; } }
fn main() {
	acc* a = rt.new(acc);
	a.add(3);
	pn(a.add(4));
	rt.free(a);
	return 0;
}
// zc0: skip