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

JDK 7 compiler crashes when type-variable is inferred from expected primitive type

XMLWordPrintable

    • b121
    • unknown, x86
    • generic, windows_xp, windows_7
    • Verified

      The following program crashes javac:

      class X {
          public static <T> T getValue() {
              return null;
          }

          public void testGenerics(Comparable<String> s) {
              int i = getValue();
          }
      }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: