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

Binary logical expressions can have numeric types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 8u40
    • core-libs
    • None
    • b40
    • generic
    • generic

    Backports

      Description

        Currently expressions using the || and && operators are always set to Object type. However, these operators evaluate to their left or right hand side without conversion to Boolean, so they should use the widest numeric type of lhs and rhs if possible.

        http://es5.github.io/#x11.11

        Attachments

          Issue Links

            Activity

              People

                attila Attila Szegedi
                hannesw Hannes Wallnoefer
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: