17th loop of "let foo = '';" throws ReferenceError
Sundararajan Athijegannathan
sundararajan.athijegannathan at oracle.com
Mon Mar 26 05:36:13 UTC 2018
Thanks for reporting this issue. Filed a bug ->
https://bugs.openjdk.java.net/browse/JDK-8200215
Thanks,
-Sundar
On 24/03/18, 3:18 AM, Jesse Schulman wrote:
> This has been tested and is happening on java 9 and 10, to reproduce:
>
> import jdk.nashorn.api.scripting.NashornScriptEngine;
> import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
> import jdk.nashorn.api.scripting.ScriptObjectMirror;
>
> public class LetReproducer {
>
> public static void main(String[] args) {
> NashornScriptEngineFactory factory = new
> NashornScriptEngineFactory();
> NashornScriptEngine engine = (NashornScriptEngine)
> factory.getScriptEngine(new String[]{"--no-java", "-strict",
> "--language=es6"});
> ScriptObjectMirror bindings = (ScriptObjectMirror)
> engine.createBindings();
> for (int i = 0; i< 17; i++) {
> try {
> bindings.eval("let foo = '';\n");
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> }
>
>
> Thanks,
> Jesse
More information about the nashorn-dev
mailing list