The following code is accepted (but should not).
Also the following unit test expects the wrong diagnostic: test/expr/offsetof/offsetof_global12.c2
type S2 struct {
i32 b;
}
type Foo struct {
i32 aa;
S2 s2;
}
fn void test1() {
u32 off1 = offsetof(Foo, s2.aa); // accepted, should be error
u32 off2 = offsetof(Foo, s2.b); // gives error: test.Foo has no member 'b';
}
The following code is accepted (but should not).
Also the following unit test expects the wrong diagnostic: test/expr/offsetof/offsetof_global12.c2