Move examples/*.sx and their expected/ snapshots into per-category subfolders (examples/<category>/...). Folder = leading filename token, with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus runner and LSP sweep now discover each category's expected/ dir, while issues/ stays flat. Example 1058's repo-root-relative companion import is made file-relative. Path strings embedded in 164 snapshots were regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
27 lines
825 B
Plaintext
27 lines
825 B
Plaintext
// Regression (issue 0143): a variadic `..$args` pack forwarded as a `[]Type`
|
|
// ARGUMENT across a call must read the right element types. The pack-slice
|
|
// materialization (`buildPackSliceValue`) built a `[]Any` (16-byte) array while
|
|
// `Type` is now `.type_value` (8 bytes) — so a `[]Type` reader (8-byte stride)
|
|
// read `[t0, pad, t1, …]` instead of `[t0, t1, …]`. The legacy interp's
|
|
// tagged-Value model hid it; the byte-accurate comptime VM exposed it.
|
|
#import "modules/std.sx";
|
|
|
|
inner :: (args: []Type) -> string {
|
|
s := "";
|
|
i : i64 = 0;
|
|
while i < args.len {
|
|
s = concat(s, type_name(args[i]));
|
|
s = concat(s, " ");
|
|
i = i + 1;
|
|
}
|
|
return s;
|
|
}
|
|
|
|
outer :: (..$args) -> string { return inner($args); }
|
|
|
|
R :: #run outer(42, "hi", true);
|
|
|
|
main :: () {
|
|
print("[{}]\n", R);
|
|
}
|