ffi 2.11 xfail: DSL call site on #jni_class-typed receiver
`act.getWindow()` on `act: *Activity` (where `Activity ::
#jni_class("android/app/Activity") { getWindow :: ... }`) should
lower to `#jni_call(*void)(act, "getWindow", "()Ljava/lang/Object;")`
(omitted-env form picking up env from the enclosing `#jni_env`
scope via 2.16b's lexical-direct path). Today's sema reports
"unresolved: 'getWindow'" because foreign-class members aren't
yet wired into the method-resolution path.
The make-green follow-up needs:
- sema: register `ForeignClassDecl.members` so method names
resolve on foreign-class receivers (or suppress the unresolved
fallback for them).
- lower: build a `foreign_class_map` in scan pass; new arm in
`lowerCall`'s method-dispatch site emits a synthetic
`FfiIntrinsicCall { kind: jni_call, args: [target, "name",
"(sig)Ret", method_args...] }` with the descriptor derived via
`jni_descriptor.deriveMethod`.
- type system: `*Activity` resolution path so `inferExprType`
on the receiver returns a known type (likely register foreign
classes as synthetic 0-field structs reusing the struct-type
machinery).
Larger session needed — pausing here at the xfail.
This commit is contained in:
1
tests/expected/ffi-jni-class-08-call.exit
Normal file
1
tests/expected/ffi-jni-class-08-call.exit
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
tests/expected/ffi-jni-class-08-call.txt
Normal file
1
tests/expected/ffi-jni-class-08-call.txt
Normal file
@@ -0,0 +1 @@
|
||||
/Users/agra/projects/sx/examples/ffi-jni-class-08-call.sx:21:16: error: unresolved: 'getWindow'
|
||||
Reference in New Issue
Block a user