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:
@@ -0,0 +1,20 @@
|
||||
// A BARE generic struct instance method with a BY-VALUE receiver (`self: Box`)
|
||||
// must dispatch to the VISIBLE author's method, whose receiver ABI matches the
|
||||
// VISIBLE author's layout. The single visible `b.Box` is one field (size 8); the
|
||||
// 2-flat-hop `c.Box` is two fields (size 16). Selecting `c.Box.dbl` (a `{i64,i64}`
|
||||
// by-value receiver) for a `b.Box` instance (`{i64}`) mismatches the layout.
|
||||
//
|
||||
// Regression (Phase E4 finding #1, by-value receiver variant): before
|
||||
// body-author ≡ layout-author, the instance method resolved by bare template name
|
||||
// and selected `c.Box.dbl`, whose by-value receiver signature did not match the
|
||||
// `b.Box` instance layout (an LLVM verify failure / wrong body). With the fix it
|
||||
// runs `b.Box.dbl` (`self.x * 2`).
|
||||
|
||||
#import "modules/std.sx";
|
||||
#import "0778-modules-bare-generic-instance-by-value-receiver/b.sx";
|
||||
|
||||
main :: () -> i32 {
|
||||
x := Box(i64).make(5);
|
||||
print("size={} dbl={}\n", size_of(type_of(x)), x.dbl());
|
||||
0
|
||||
}
|
||||
Reference in New Issue
Block a user