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