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

inference fails when a generic method is invoked with raw arguments

XMLWordPrintable

    • b34
    • generic, sparc
    • generic, solaris_10
    • Not verified

        The following program does not compile:

        class X<T> {}
        class Test {
                public void test() {
                        m(new X<X<Integer>>(), new X()); // compile error in javac
                }
                public <T> void m(X<T> x, T t) {}
        }

        ACTUAL BEHAVIOR: does not compile

        EXPECTED BEHAVIOUR: compile with warning

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: