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

Binary logical expressions can have numeric types

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u40
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b40
    • CPU:
      generic
    • OS:
      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

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: