aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/closure_writes_visible_outside.zc
blob: aac53907a2a22cbe484db714f464463c21f5d1ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// expect: 3/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() {
	int n = 0;
	let inc = fn() { n++; return n; };
	inc(); inc(); inc();
	pn(n);
	return 0;
}
// zc0: skip