//ww:run-exit 33 package main; // #59.13: two-level embedding (outer2 embeds deep embeds cbs) — the // promotion flattens transitively, and a promoted `*fn(...)` field // still resolves as an indirect callee (the fieldinfo run keeps the // inner field's own type node). type cbs = struct { cb: *fn(x: i32) i32, k: i32, }; type deep = struct { cbs, extra: i32, }; type outer2 = struct { deep, tail: i32, }; fn twice(x: i32) i32 = { return x * 2; }; fn main() i32 = { let o: outer2; o.cb = &twice; o.k = 4; o.extra = 5; o.tail = 6; let r: i32 = o.cb(9); return r + o.k + o.extra + o.tail; };