test: group examples into per-category folders

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.
This commit is contained in:
agra
2026-06-21 14:41:34 +03:00
parent 6d1409bc1f
commit 66bdc70bf1
3357 changed files with 456 additions and 363 deletions

View File

@@ -0,0 +1,17 @@
// Regression (issue 0102, Phase C): value-receiver free-function UFCS under a
// flat same-name collision must be TYPED as the author lowering dispatches.
// a.sx (imported first → first-wins winner) authors `tag -> string`; b.sx
// authors its OWN `tag -> i64`. In b.sx, `v.tag()` dispatches b.tag (i64), but
// before the fix the call PLAN typed it as a.tag (string, first-wins) — so the
// pack-fn `print` boxed the raw i64 110 as a string pointer and dereferenced
// 0x6e → segfault. `CallResolver.plan` now selects the SAME author the lowering
// call-path binds, so plan-typing and dispatch can't disagree (fix-0102 F2).
#import "modules/std.sx";
#import "0740-modules-flat-same-name-ufcs-typing/a.sx";
#import "0740-modules-flat-same-name-ufcs-typing/b.sx";
main :: () -> i32 {
show_a(); // a-side: own == winner → string, byte-for-byte unchanged
show_b(); // b-side: shadow author → i64, typed + dispatched as b.tag
0
}