langtools/test/tools/javac/generics/diamond/neg/Neg02.java
changeset 5327 cdc146f667c7
parent 3765 9548183897cb
parent 5321 c8efe769cb3b
child 8635 383a416a2bdf
--- a/langtools/test/tools/javac/generics/diamond/neg/Neg02.java	Thu Apr 22 16:54:44 2010 -0700
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg02.java	Thu Apr 29 14:10:24 2010 -0700
@@ -1,10 +1,10 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 6840638
+ * @bug 6939620
  *
- * @summary  Project Coin: Improved Type Inference for Generic Instance Creation (aka 'diamond')
+ * @summary  Switch to 'complex' diamond inference scheme
  * @author mcimadamore
- * @compile/fail/ref=Neg02.out Neg02.java -source 1.7 -XDrawDiagnostics
+ * @compile/fail/ref=Neg02.out Neg02.java -XDrawDiagnostics
  *
  */
 
@@ -16,46 +16,46 @@
     }
 
     void testSimple() {
-        Foo<String> f1 = new Foo<>(""); //new Foo<Integer> created
-        Foo<? extends String> f2 = new Foo<>(""); //new Foo<Integer> created
-        Foo<?> f3 = new Foo<>(""); //new Foo<Object> created
-        Foo<? super String> f4 = new Foo<>(""); //new Foo<Object> created
+        Foo<String> f1 = new Foo<>("");
+        Foo<? extends String> f2 = new Foo<>("");
+        Foo<?> f3 = new Foo<>("");
+        Foo<? super String> f4 = new Foo<>("");
 
-        Foo<String> f5 = new Foo<>(""){}; //new Foo<Integer> created
-        Foo<? extends String> f6 = new Foo<>(""){}; //new Foo<Integer> created
-        Foo<?> f7 = new Foo<>(""){}; //new Foo<Object> created
-        Foo<? super String> f8 = new Foo<>(""){}; //new Foo<Object> created
+        Foo<String> f5 = new Foo<>(""){};
+        Foo<? extends String> f6 = new Foo<>(""){};
+        Foo<?> f7 = new Foo<>(""){};
+        Foo<? super String> f8 = new Foo<>(""){};
 
-        Foo<String> f9 = new Foo<>("", ""); //new Foo<Integer> created
-        Foo<? extends String> f10 = new Foo<>("", ""); //new Foo<Integer> created
-        Foo<?> f11 = new Foo<>("", ""); //new Foo<Object> created
-        Foo<? super String> f12 = new Foo<>("", ""); //new Foo<Object> created
+        Foo<String> f9 = new Foo<>("", "");
+        Foo<? extends String> f10 = new Foo<>("", "");
+        Foo<?> f11 = new Foo<>("", "");
+        Foo<? super String> f12 = new Foo<>("", "");
 
-        Foo<String> f13 = new Foo<>("", ""){}; //new Foo<Integer> created
-        Foo<? extends String> f14 = new Foo<>("", ""){}; //new Foo<Integer> created
-        Foo<?> f15 = new Foo<>("", ""){}; //new Foo<Object> created
-        Foo<? super String> f16 = new Foo<>("", ""){}; //new Foo<Object> created
+        Foo<String> f13 = new Foo<>("", ""){};
+        Foo<? extends String> f14 = new Foo<>("", ""){};
+        Foo<?> f15 = new Foo<>("", ""){};
+        Foo<? super String> f16 = new Foo<>("", ""){};
     }
 
     void testQualified() {
-        Foo<String> f1 = new Neg02.Foo<>(""); //new Foo<Integer> created
-        Foo<? extends String> f2 = new Neg02.Foo<>(""); //new Foo<Integer> created
-        Foo<?> f3 = new Neg02.Foo<>(""); //new Foo<Object> created
-        Foo<? super String> f4 = new Neg02.Foo<>(""); //new Foo<Object> created
+        Foo<String> f1 = new Neg02.Foo<>("");
+        Foo<? extends String> f2 = new Neg02.Foo<>("");
+        Foo<?> f3 = new Neg02.Foo<>("");
+        Foo<? super String> f4 = new Neg02.Foo<>("");
 
-        Foo<String> f5 = new Neg02.Foo<>(""){}; //new Foo<Integer> created
-        Foo<? extends String> f6 = new Neg02.Foo<>(""){}; //new Foo<Integer> created
-        Foo<?> f7 = new Neg02.Foo<>(""){}; //new Foo<Object> created
-        Foo<? super String> f8 = new Neg02.Foo<>(""){}; //new Foo<Object> created
+        Foo<String> f5 = new Neg02.Foo<>(""){};
+        Foo<? extends String> f6 = new Neg02.Foo<>(""){};
+        Foo<?> f7 = new Neg02.Foo<>(""){};
+        Foo<? super String> f8 = new Neg02.Foo<>(""){};
 
-        Foo<String> f9 = new Neg02.Foo<>("", ""); //new Foo<Integer> created
-        Foo<? extends String> f10 = new Neg02.Foo<>("", ""); //new Foo<Integer> created
-        Foo<?> f11 = new Neg02.Foo<>("", ""); //new Foo<Object> created
-        Foo<? super String> f12 = new Neg02.Foo<>("", ""); //new Foo<Object> created
+        Foo<String> f9 = new Neg02.Foo<>("", "");
+        Foo<? extends String> f10 = new Neg02.Foo<>("", "");
+        Foo<?> f11 = new Neg02.Foo<>("", "");
+        Foo<? super String> f12 = new Neg02.Foo<>("", "");
 
-        Foo<String> f13 = new Neg02.Foo<>("", ""){}; //new Foo<Integer> created
-        Foo<? extends String> f14 = new Neg02.Foo<>("", ""){}; //new Foo<Integer> created
-        Foo<?> f15 = new Neg02.Foo<>("", ""){}; //new Foo<Object> created
-        Foo<? super String> f16 = new Neg02.Foo<>("", ""){}; //new Foo<Object> created
+        Foo<String> f13 = new Neg02.Foo<>("", ""){};
+        Foo<? extends String> f14 = new Neg02.Foo<>("", ""){};
+        Foo<?> f15 = new Neg02.Foo<>("", ""){};
+        Foo<? super String> f16 = new Neg02.Foo<>("", ""){};
     }
 }