ffi 2.16b xfail: omitted env in #jni_call inside #jni_env
`#jni_call(void)(target, "name", "sig")` (3 args before the first
string literal) should work inside an enclosing `#jni_env(env) { ... }`
scope, picking up the env from the block's value directly. Today's
lowering expects 4+ args and errors with "#jni_call requires env,
target, method name, and signature".
The make-green follow-up adds a lowering-side env stack maintained
across the `#jni_env` body walk, and a disambiguation in
`lowerJniCall` that detects "env omitted" via the position of the
first string-literal arg (method name at index 1 → omitted; at index
2 → explicit env).
This commit is contained in:
1
tests/expected/ffi-jni-env-02-lexical-direct.exit
Normal file
1
tests/expected/ffi-jni-env-02-lexical-direct.exit
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
tests/expected/ffi-jni-env-02-lexical-direct.txt
Normal file
1
tests/expected/ffi-jni-env-02-lexical-direct.txt
Normal file
@@ -0,0 +1 @@
|
||||
/Users/agra/projects/sx/examples/ffi-jni-env-02-lexical-direct.sx: error: #jni_call requires env, target, method name, and signature
|
||||
Reference in New Issue
Block a user