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

struct point { int x; int y; }

// expect: p: used before it is initialized
fn main() {
	point p;
	p.x = 1;
	rt.put_n(p.y);
	return 0;
}