Skip to content

JSR 223 binding no longer works in Scala 3, worked in Scala 2 #17237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jpsacha opened this issue Apr 12, 2023 · 1 comment
Open

JSR 223 binding no longer works in Scala 3, worked in Scala 2 #17237

jpsacha opened this issue Apr 12, 2023 · 1 comment

Comments

@jpsacha
Copy link

jpsacha commented Apr 12, 2023

Compiler version

Tested with 3.2.2, but likely broken in other Scala 3 versions

Minimized code

This code should execute simple statement println(a) and print value 1

val eng = new ScriptEngineManager().getEngineByName("scala")
eng.put("a", 1)
eng.eval("println(a)")

Output

Execution of eng.eval("println(a)") results in error:

-- [E006] Not Found Error: -----------------------------------------------------
1 |println(b)
  |        ^
  |        Not found: b
  |
  | longer explanation available when compiling with `-explain`
1 error found

Expectation

In this case, a value a, set to 1, should be passed to the ScriptEngine evaluating the script, through binding. Script should compile and execute without errors.

@jpsacha jpsacha added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 12, 2023
@anatoliykmetyuk anatoliykmetyuk added area:scripting and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 17, 2023
@subes
Copy link

subes commented Nov 10, 2023

Referencing older issue: #14262

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants