for (LeftHandSideExpression in Expression) crashes the compiler

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • 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)
           ...

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: