aboutsummaryrefslogtreecommitdiff
path: root/tests/icon/accept/nested_declaration.zc
blob: 9b360e826c0c04fa338ecda69bebb85b7da92f63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
include rt;
include run;
include icon;
fn main() {
	let q = run.tokens("int n = 2; { int unused = 9; int added = 3; n += added; } return n;");
	let type = run.tokens("i32");
	let a = icon.undeclare(q, "unused");
	let b = icon.change_type(a, "added", type);
	rt.put_n(run.eval(b)); rt.put_c(10);
	return 0;
}