//ww:run-exit 42 package main; // #59.13: fields declared after an embed sit at base+inner.size, the // offset() fold sees promoted names, and promoted access works through // a pointer receiver and a nested chain (o.p.y — promoted struct field // then its own member). type pos = struct { x: i32, y: i32, }; type mid = struct { p: pos, tag: i32, }; type outer = struct { mid, c: i32, }; fn bump(o: *outer) void = { o.tag += 1; o.p.y = o.p.x + 2; }; fn main() i32 = { let o: outer; o.p.x = 5; o.tag = 9; o.c = 20; bump(&o); let shift: i64 = offset(o.c) - offset(o.tag); return o.p.y + o.tag + o.c + shift: i32 + 1; };