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

FoldConstants need to guard against ArrayLiteralNode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • core-libs
    • None

      FoldConstants#leaveIfNode() and FoldConstants#leaveTernaryNode() need to guard against ArrayLiteralNode:

      jjs> (function(){if([a]);})()

      Expected: throws ReferenceError
      Actual: no error

      jjs> [a] ? 1 : 2

      Expected: throws ReferenceError
      Actual: no error

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: