getType() called on DISCARD node

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: 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; }

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

              Created:
              Updated:
              Resolved: