aboutsummaryrefslogtreecommitdiff
path: root/tests/icon/reject/step_else_side_effect.zc
blob: 43c0d5d7f743531f225a0887076e93d69da25a24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
include rt;
include run;
include icon;
int calls;
int condition() { calls++; return 1; }
fn main() {
	let q = run.tokens("if (condition()) { return 1; } else return 2;");
	let f = icon.begin(q);
	rt.put_n(icon.step(f)); rt.put_c(' '); rt.put_n(icon.state(f)); rt.put_c(' '); rt.put_n(calls); rt.put_c(10);
	icon.close(d*f);
	return 0;
}