aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/uninit_partial_struct_rejected.zc
blob: 9c71f925ba6a4d88367fe93a0d8f273e936c771f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// expect error: used before it is initialized
// spec 4.1.5: writing some fields does not initialize the aggregate
include rt;
struct point { int x; int y; }
fn main() {
	point p;
	p.x = 1;
	rt.put_n(p.y);
	return 0;
}
// zc0: skip