diff -r 74f0c05c51eb -r ca32f2986301 test/tools/javac/generics/diamond/neg/Neg02.java --- a/test/tools/javac/generics/diamond/neg/Neg02.java Mon Mar 07 14:11:48 2011 +0000 +++ b/test/tools/javac/generics/diamond/neg/Neg02.java Mon Mar 07 14:31:50 2011 +0000 @@ -1,8 +1,9 @@ /* * @test /nodynamiccopyright/ - * @bug 6939620 + * @bug 6939620 7020044 * - * @summary Switch to 'complex' diamond inference scheme + * @summary Check that diamond fails when inference violates declared bounds + * (test with nested class, qualified/simple type expressions) * @author mcimadamore * @compile/fail/ref=Neg02.out Neg02.java -XDrawDiagnostics * @@ -21,20 +22,10 @@ Foo f3 = new Foo<>(""); Foo f4 = new Foo<>(""); - Foo f5 = new Foo<>(""){}; - Foo f6 = new Foo<>(""){}; - Foo f7 = new Foo<>(""){}; - Foo f8 = new Foo<>(""){}; - - Foo f9 = new Foo<>("", ""); - Foo f10 = new Foo<>("", ""); - Foo f11 = new Foo<>("", ""); - Foo f12 = new Foo<>("", ""); - - Foo f13 = new Foo<>("", ""){}; - Foo f14 = new Foo<>("", ""){}; - Foo f15 = new Foo<>("", ""){}; - Foo f16 = new Foo<>("", ""){}; + Foo f5 = new Foo<>("", ""); + Foo f6 = new Foo<>("", ""); + Foo f7 = new Foo<>("", ""); + Foo f8 = new Foo<>("", ""); } void testQualified() { @@ -43,19 +34,9 @@ Foo f3 = new Neg02.Foo<>(""); Foo f4 = new Neg02.Foo<>(""); - Foo f5 = new Neg02.Foo<>(""){}; - Foo f6 = new Neg02.Foo<>(""){}; - Foo f7 = new Neg02.Foo<>(""){}; - Foo f8 = new Neg02.Foo<>(""){}; - - Foo f9 = new Neg02.Foo<>("", ""); - Foo f10 = new Neg02.Foo<>("", ""); - Foo f11 = new Neg02.Foo<>("", ""); - Foo f12 = new Neg02.Foo<>("", ""); - - Foo f13 = new Neg02.Foo<>("", ""){}; - Foo f14 = new Neg02.Foo<>("", ""){}; - Foo f15 = new Neg02.Foo<>("", ""){}; - Foo f16 = new Neg02.Foo<>("", ""){}; + Foo f5 = new Neg02.Foo<>("", ""); + Foo f6 = new Neg02.Foo<>("", ""); + Foo f7 = new Neg02.Foo<>("", ""); + Foo f8 = new Neg02.Foo<>("", ""); } }