Project a pointer type to its target: `pointee(*X)` -> `X`. The one reflection primitive missing for the `race` result synthesis (`*Task(A)` -> `A` via `field_type(pointee(*Task(A)), 0)`) — reflection could read aggregate fields but was blind to a pointer's target type. Mirrors the `field_type` builtin: declared `#builtin` in std/core.sx, resolved as a lower-time type-call fold in resolveTypeCallWithBindings (src/ir/lower/generic.zig) so it composes in any type-arg slot. `.pointer` -> pointee, `.many_pointer` -> element; a non-pointer arg is a loud diagnostic + `.unresolved` sentinel (no silent fallback). Adversarially reviewed (SHIP). Locked by examples/comptime/0647-comptime-pointee-reflection.sx. Suite green (819/0). PLAN-RACE step 1 of 6.
5 lines
105 B
Plaintext
5 lines
105 B
Plaintext
pointee(*i64) = i64
|
|
pointee(*bool) = bool
|
|
pointee(*Box(f64)) field0 = f64
|
|
Payload(*Box(i64)) value = 42
|