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.
26 lines
823 B
Plaintext
26 lines
823 B
Plaintext
// Phase 3 step 3.0: keyword count must equal call-site arity (excluding
|
|
// self). `something_extra(x)` — name split gives ["something", "extra"]
|
|
// = 2 keywords; arity = 1. Compiler must diagnose at the call site.
|
|
//
|
|
// Pre-3.0: bails at lower.zig with the generic Phase 3/4 diagnostic
|
|
// (which subsumes this case). Once 3.0 lands, the diagnostic becomes a
|
|
// specific "keyword count mismatch" message.
|
|
#import "modules/std.sx";
|
|
#import "modules/build.sx";
|
|
|
|
SxProbeMismatch :: #objc_class("SxProbeMismatch") extern {
|
|
something_extra :: (self: *Self, x: i32) -> i32;
|
|
}
|
|
|
|
main :: () -> i32 {
|
|
inline if OS == .macos {
|
|
inst : *SxProbeMismatch = null;
|
|
n := inst.something_extra(7);
|
|
print("n = {}\n", n);
|
|
}
|
|
inline if OS != .macos {
|
|
print("skipped (not macos)\n");
|
|
}
|
|
0
|
|
}
|