-
Sub-task
-
Resolution: Fixed
-
P3
-
8
-
None
-
b110
-
generic
-
generic
See ECMA 5.1 section 12.6.4 The for-in Statement. Nashorn compiler crashes with assertion error on for(LeftHandSideExpression in Expression).
jjs> Function("for(x.x in 0) {}");
Exception in thread "main" java.lang.AssertionError
at
jdk.nashorn.internal.codegen.CodeGenerator.enterForIn(CodeGenerator.java:855)
at
jdk.nashorn.internal.codegen.CodeGenerator.enterForNode(CodeGenerator.java:807)
at jdk.nashorn.internal.ir.ForNode.accept(ForNode.java:90)
at
jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at
jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:53)
...
jjs> Function("for(x.x in 0) {}");
Exception in thread "main" java.lang.AssertionError
at
jdk.nashorn.internal.codegen.CodeGenerator.enterForIn(CodeGenerator.java:855)
at
jdk.nashorn.internal.codegen.CodeGenerator.enterForNode(CodeGenerator.java:807)
at jdk.nashorn.internal.ir.ForNode.accept(ForNode.java:90)
at
jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at
jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:53)
...