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.
20 lines
639 B
Plaintext
20 lines
639 B
Plaintext
// Phase 2 step 2.3 (PLAN-FFI.md): xfail then green for class/static
|
|
// method declarations inside a `#jni_class` body.
|
|
//
|
|
// Instance vs class method is determined by the first param's TYPE:
|
|
// `(self: *Self, ...)` ⇒ instance, anything else (here, `(n: i32)`)
|
|
// ⇒ class method, dispatched via `GetStaticMethodID` /
|
|
// `CallStatic*` at lowering time (Phase 2.12). No explicit `static`
|
|
// keyword; the param shape carries the signal.
|
|
|
|
#import "modules/std.sx";
|
|
|
|
Math :: #jni_class("java/lang/Math") extern {
|
|
abs :: (n: i32) -> i32; // no `self: *Self` → class method
|
|
}
|
|
|
|
main :: () -> i32 {
|
|
print("parse-only ok\n");
|
|
0
|
|
}
|