aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/uninit_loop.zc
blob: d345296f2ada961d8402bdac139fb64757aabae6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
namespace;
include rt;

// expect: x: used before it is initialized
fn main() {
	int x;
	int n = 0;
	while (n) { x = 1; n = 0; }
	rt.put_n(x);
	return 0;
}