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.
19 lines
580 B
Plaintext
19 lines
580 B
Plaintext
// Passing a `*T` where a `T` value is expected is caught at the call site —
|
|
// not only for `for xs (*m)` loop captures (see 215) but for any pointer,
|
|
// here a `*Move` parameter forwarded into a by-value parameter. Without the
|
|
// check this slipped through to the LLVM verifier as "Call parameter type
|
|
// does not match function signature".
|
|
|
|
#import "modules/std.sx";
|
|
|
|
Move :: struct { flag: i64; }
|
|
|
|
take :: (m: Move) -> i64 { return m.flag; }
|
|
|
|
forward :: (m: *Move) -> i64 { return take(m); }
|
|
|
|
main :: () -> i32 {
|
|
mv : Move = .{ flag = 7 };
|
|
return xx forward(@mv);
|
|
}
|