aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/member_dot_arrow_same.zc
blob: f900a1dc79fef32db6b6e59d45b26c58560013f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// expect: 3/4/5/6/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
struct pt { int x; int y; }
fn main() {
	pt a;
	a.x = 3; a->y = 4;
	pt* p = &a;
	pn(a.x); pn(a->y);
	p.x = 5; p->y = 6;
	pn(p.x); pn(p->y);
	return 0;
}
// zc0: skip