1 /* 2 * @test /nodynamiccopyright/ 3 * @bug 7188968 4 * 5 * @summary Diamond: javac generates diamond inference errors when in 'finder' mode 6 * @author mcimadamore 7 * @compile/fail/ref=T7188968.out -Xlint:unchecked -XDrawDiagnostics T7188968.java 8 * 9 */ 10 import java.util.List; 11 12 class T7188968 { 13 14 static class Foo<X> { Foo(List<X> ls, Object o)15 Foo(List<X> ls, Object o) { } makeFoo(List<Z> lz, Object o)16 static <Z> Foo<Z> makeFoo(List<Z> lz, Object o) { return null; } 17 } 18 test(List l)19 void test(List l) { 20 new Foo(l, unknown); 21 new Foo(l, unknown) { }; 22 new Foo<>(l, unknown); 23 Foo.makeFoo(l, unknown); 24 } 25 } 26