Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8354511

ForOfLoopTreeImpl asserts that node isForIn not isForOf

XMLWordPrintable

    • b55
    • 9
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Clear problem in source code

      A DESCRIPTION OF THE PROBLEM :
      line 39 of Nashorn/src/org.openjdk.nashorn/share/classes/org/openjdk/nashorn/api/tree
      /ForOfLoopTreeImpl.java appears to be incorrect, asserting that the node is a for in loop not a for of loop.

      REGRESSION : Last worked in version 25

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Try parsing a for .. of loop with asserts enabled

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Successful parse
      ACTUAL -
      An assert with an incorrect error message no less.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: