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

Regression: compiler accepts invalid cast from int to Byte

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b143
    • CPU:
      unknown
    • OS:
      generic
    • Verification:
      Verified

      Description

      This program should be rejected:

      class Test {
      Byte b = (Byte) 0;
      }

      Instead, the compiler accepts it, starting from JDK 7 b112. The problem is likely to be related to the changes in cats conversion involving 292 (see 6979683).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mcimadamore Maurizio Cimadamore
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: