13 JNI examples migrated (1410-1419/1423/1424/1425): import runtime classes
'#foreign #jni_class("X") {' → '#jni_class("X") extern {'. 1417 (all-runtimes)
also exercises #jni_interface/#objc_class/#objc_protocol/#swift_class/#swift_struct/
#swift_protocol — all take the postfix modifier (verified by probe), migrated via a
generalized '#foreign #<directive>("X") {' → '… extern {' rewrite. No 14xx snapshot
asserts on 'foreign'; empty snapshot diff, corpus-validated.
KEPT comment-only #foreign in 1426 (jni-extern-class test, no decls). Suite green
(647 corpus / 444 unit, 0 failed).
19 lines
635 B
Plaintext
19 lines
635 B
Plaintext
// Phase 2 step 2.0 (PLAN-FFI.md): xfail parser test for the
|
|
// type-introducer `Foo :: #jni_class("java/path/Foo") extern { }` directive.
|
|
//
|
|
// Today's parser doesn't recognize `#jni_class` as a known hash
|
|
// directive after `::`, so it falls through to expression parsing
|
|
// and fails at the `#` token. Step 2.1 (next commit) extends
|
|
// `parseConstBinding` to accept the directive, treat an empty body
|
|
// as an opaque forward declaration, and re-snapshots this file to
|
|
// capture the green behavior.
|
|
|
|
#import "modules/std.sx";
|
|
|
|
Foo :: #jni_class("java/path/Foo") extern { }
|
|
|
|
main :: () -> i32 {
|
|
print("parse-only ok\n");
|
|
0
|
|
}
|