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

Regression: unchecked method call does not erase return type

XMLWordPrintable

    • b120
    • unknown
    • generic
    • Verified

      The following program does not compile anymore after 7166552:

      import java.util.List;

      class Test<A> {

          public static void test(List l) {
              Test<Object> to = m(l);
          }

          public static <E> Test<String> m(List<E> le) {
              return null;
          }
      }

      [used to compile with unchecked warnings]

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: