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

Regression: compiler accepts invalid cast from int to Byte

XMLWordPrintable

    • b143
    • unknown
    • generic
    • Verified

      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).

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: