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.
16 lines
721 B
Plaintext
16 lines
721 B
Plaintext
// An array dimension that folds to a valid compile-time integer but exceeds a
|
|
// `u32` (`[5_000_000_000]i64`) is a hard error — a clean sx diagnostic with a
|
|
// non-zero exit, NOT a compiler panic.
|
|
//
|
|
// Regression (issue 0087 / F0.4 attempt 6): the dimension folded to a valid i64
|
|
// (5e9) and was then narrowed with an unchecked `@intCast` to u32, aborting the
|
|
// COMPILER with "integer does not fit in destination type". Every dim/lane fold
|
|
// now narrows through the single range-checked `program_index.foldDimU32`, which
|
|
// reports an out-of-u32-range dimension as this diagnostic and halts the build.
|
|
#import "modules/std.sx";
|
|
|
|
main :: () {
|
|
a : [5000000000]i64 = ---;
|
|
print("unreachable: {}\n", a.len);
|
|
}
|