ffi M5.A.next.4A.bare.5: end-to-end smoke for bare $args + dynamic reflection
Step 4A final-slice's smoke test. Exercises the FULL surface
step 5's generic Into(Block) impl needs to operate:
1. A pack-fn binds $args (whole pack as []Type).
2. The body walks `list := $args` at INTERP time.
3. Per position, calls `type_name(list[i])` — the dynamic
form that emits `callBuiltin(.type_name, ...)` at lower
time, dispatched at interp time to read the runtime
Value.type_tag and return the concrete type name.
`examples/172-pack-builder-smoke.sx` exercises four call
shapes via #run:
describe() → []
describe(42) → [s64]
describe(42, "hi") → [s64, string]
describe(true, 3.14, "x", 99) → [bool, f64, string, s64]
Each call shape builds its own [N x Any] slice of .type_tag
values at lowering time, the interp walks the slice, and the
per-element type names come out kind-honestly.
212/212 example tests + zig build test green.
This commit is contained in:
1
tests/expected/172-pack-builder-smoke.exit
Normal file
1
tests/expected/172-pack-builder-smoke.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
6
tests/expected/172-pack-builder-smoke.txt
Normal file
6
tests/expected/172-pack-builder-smoke.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
[]
|
||||
[s64]
|
||||
[s64, string]
|
||||
[bool, f64, string, s64]
|
||||
--- build done ---
|
||||
rt
|
||||
Reference in New Issue
Block a user