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

cast conversion fails when converting a type-variable to primitive type

XMLWordPrintable

    • b99
    • Verified

      The following program is erroneously rejected by javac:

      class Test<T> {
          public void foo(T valIn){
              double val = (double ) valIn;
          }
      }

            vromero Vicente Arturo Romero Zaldivar
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: