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.
18 lines
719 B
Plaintext
18 lines
719 B
Plaintext
// A generic value-param arg that does not fit the param's declared integer type
|
|
// (`Box(5_000_000_000)` for `$K: u32`) is a hard error — a clean diagnostic +
|
|
// non-zero exit, NOT a silent truncating bind.
|
|
//
|
|
// Regression (F0.4 attempt 8, item 1): `resolveValueParamArg` bound the folded
|
|
// i64 without range-checking the declared type, so an out-of-u32 arg compiled
|
|
// and ran. The bind now routes a `u32` count through the shared
|
|
// `program_index.foldDimU32` gate (the same one array dims / Vector lanes use),
|
|
// so an oversized value is rejected before instantiation.
|
|
#import "modules/std.sx";
|
|
|
|
Box :: struct ($K: u32) { value: i64; }
|
|
|
|
main :: () {
|
|
b : Box(5000000000) = ---;
|
|
print("unreachable\n");
|
|
}
|