harec should error out here, but instead it compiles as though b were a struct rather than a pointer:
let a = struct { x: int = 1, y: int = 2 };
let b = &a;
let c = &b.y;
export fn main() void = {
assert(*c == 2); // fails
};
The same happens for tuples (initialize a to (1, 2)
and c to &b.1
).
Alexey Yerin referenced this ticket in commit 68d8440.
Alexey Yerin referenced this ticket in commit 68d8440.