// Feature 1 — a pack element exposes ONLY the constraint protocol's interface. // `xs[i].v` reaches a concrete field of IntCell that is not part of `Box`, so // it's rejected even though IntCell does have `v` — a pack element is viewed // through the protocol, like a constrained generic. (Protocol methods like // `get()` ARE callable; see examples 193/194.) #import "modules/std.sx"; Box :: protocol(T: Type) { get :: () -> T; } IntCell :: struct { v: i64; } impl Box(i64) for IntCell { get :: (self: *IntCell) -> i64 => self.v; } leak :: (..xs: Box) -> i64 { return xs[0].v; // `v` is not part of Box — error } main :: () -> i32 { print("{}\n", leak(IntCell.{ v = 5 })); 0 }