// Variadic heterogeneous type packs — step 4A final-slice // follow-up. `type_name()` where the argument is // NOT a static type expression (e.g. `list[i]` indexing into // a `$args`-derived `[]Type` slice) silently folds to "s64" // today because `resolveTypeArg`'s index_expr fall-through // returns `.s64`. That's exactly the kind of silent unimplemented // arm the CLAUDE.md REJECTED PATTERNS section forbids. // // Next commit teaches `tryLowerReflectionCall` to detect "arg // not statically resolvable" and emit a `builtin_call` to the // new `.type_name` builtin. The interp's arm (already wired in // commit 9600ba5) reads the runtime `.type_tag` Value and // returns the per-position concrete type name. // // Expected output after fix: // s64string #import "modules/std.sx"; walk :: (..$args) -> string { list := $args; s := ""; i : s64 = 0; while i < list.len { s = concat(s, type_name(list[i])); i = i + 1; } return s; } main :: () -> s32 { print("{}\n", walk(42, "hi")); return 0; }