test/tools/javac/generics/inference/6718364/T6718364.java

Thu, 27 Aug 2009 11:08:27 -0700

author
jjg
date
Thu, 27 Aug 2009 11:08:27 -0700
changeset 384
ed31953ca025
parent 93
30a415f8667f
child 611
4172cfff05f0
permissions
-rw-r--r--

6875336: some tests should use /nodynamiccopyright/
Reviewed-by: darcy

mcimadamore@93 1 /**
jjg@384 2 * @test /nodynamiccopyright/
mcimadamore@93 3 * @bug 6718364
mcimadamore@93 4 * @summary inference fails when a generic method is invoked with raw arguments
mcimadamore@93 5 * @compile/ref=T6718364.out -XDstdout -XDrawDiagnostics -Xlint:unchecked T6718364.java
mcimadamore@93 6 */
mcimadamore@93 7 class T6718364 {
mcimadamore@93 8 class X<T> {}
mcimadamore@93 9
mcimadamore@93 10 public <T> void m(X<T> x, T t) {}
mcimadamore@93 11
mcimadamore@93 12 public void test() {
mcimadamore@93 13 m(new X<X<Integer>>(), new X());
mcimadamore@93 14 }
mcimadamore@93 15 }

mercurial