Open scabug opened 10 years ago
Imported From: https://issues.scala-lang.org/browse/SI-8669?orig=1 Reporter: Mio Ussum (temp44) Affected Versions: 2.11.1
@som-snytt said: It works if the interface is java.lang.Runnable, but not with the nested interface.
Mio Ussum (temp44) said: Yes, i figured that. However, it does not work if the interface is not nested, either. I only provided it nested to make the snippet shorter.
Upon the first evaluation of a script, an instance of the specified interface is returned as expected.
Upon the second evaluation of the same script (using a new ScriptEngine), the returned object is no longer an instance of the interface.
The code snippet, when executed, throws a RuntimeException on "call 2".