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

getType() called on DISCARD node

XMLWordPrintable

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

      From http://mail.openjdk.java.net/pipermail/nashorn-dev/2013-October/002291.html:

      The left-hand side of a BinaryNode does not have a Type if it is a Discard node, that means `lhs.getType()` may throw an assertion error. Moving the Type.widest() calls makes sure `lhs.getType()` is only called when it is safe to do.

      test case:
      /* no assertion */ function f() { if(x3, y) x; }

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

              Created:
              Updated:
              Resolved: