changeset 2929:c9e7d5d6a2e2

8075166: Group 14d: golden files for tests in tools/javac/generics/wildcards dir Reviewed-by: jjg
author sogoel
date Fri, 15 May 2015 18:03:51 -0700
parents c33a27c343cb
children 8bc4c0b6eeb7
files test/tools/javac/generics/wildcards/neg/AmbiguousCast.java test/tools/javac/generics/wildcards/neg/AmbiguousCast.out test/tools/javac/generics/wildcards/neg/Capture.java test/tools/javac/generics/wildcards/neg/Capture.out test/tools/javac/generics/wildcards/neg/CastFail.java test/tools/javac/generics/wildcards/neg/CastFail.out test/tools/javac/generics/wildcards/neg/CastFail1.java test/tools/javac/generics/wildcards/neg/CastFail10.java test/tools/javac/generics/wildcards/neg/CastFail11.java test/tools/javac/generics/wildcards/neg/CastFail12.java test/tools/javac/generics/wildcards/neg/CastFail13.java test/tools/javac/generics/wildcards/neg/CastFail14.java test/tools/javac/generics/wildcards/neg/CastFail15.java test/tools/javac/generics/wildcards/neg/CastFail16.java test/tools/javac/generics/wildcards/neg/CastFail17.java test/tools/javac/generics/wildcards/neg/CastFail18.java test/tools/javac/generics/wildcards/neg/CastFail19.java test/tools/javac/generics/wildcards/neg/CastFail2.java test/tools/javac/generics/wildcards/neg/CastFail20.java test/tools/javac/generics/wildcards/neg/CastFail21.java test/tools/javac/generics/wildcards/neg/CastFail3.java test/tools/javac/generics/wildcards/neg/CastFail4.java test/tools/javac/generics/wildcards/neg/CastFail5.java test/tools/javac/generics/wildcards/neg/CastFail6.java test/tools/javac/generics/wildcards/neg/CastFail7.java test/tools/javac/generics/wildcards/neg/CastFail8.java test/tools/javac/generics/wildcards/neg/CastFail9.java test/tools/javac/generics/wildcards/neg/CastTest.java test/tools/javac/generics/wildcards/neg/CastWarn14.java test/tools/javac/generics/wildcards/neg/ParamCast.java test/tools/javac/generics/wildcards/neg/ParamCast.out test/tools/javac/generics/wildcards/neg/Readonly.java test/tools/javac/generics/wildcards/neg/Readonly.out test/tools/javac/generics/wildcards/neg/Unbounded.java test/tools/javac/generics/wildcards/neg/Unbounded.out
diffstat 35 files changed, 306 insertions(+), 1394 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/generics/wildcards/neg/AmbiguousCast.java	Fri May 15 17:47:03 2015 -0700
+++ b/test/tools/javac/generics/wildcards/neg/AmbiguousCast.java	Fri May 15 18:03:51 2015 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 4897892
  * @summary cast to parameterized type is accepted although it should be rejected
  * @author gafter
  *
- * @compile/fail  -Werror -Xlint:unchecked AmbiguousCast.java
+ * @compile/ref=AmbiguousCast.out -XDrawDiagnostics -Xlint:unchecked AmbiguousCast.java
  */
 
 class Test {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/AmbiguousCast.out	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,2 @@
+AmbiguousCast.java:25:41: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), java.lang.Object, Test.GenericWrapper<java.lang.String>
+1 warning
--- a/test/tools/javac/generics/wildcards/neg/Capture.java	Fri May 15 17:47:03 2015 -0700
+++ b/test/tools/javac/generics/wildcards/neg/Capture.java	Fri May 15 18:03:51 2015 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 4916634
  * @summary Wildcard capture
  * @author gafter
  *
- * @compile/fail  Capture.java
+ * @compile/fail/ref=Capture.out -XDrawDiagnostics  Capture.java
  */
 
 class X<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/Capture.out	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,2 @@
+Capture.java:14:9: compiler.err.cant.apply.symbol: kindname.method, f4, X<X<T>>, X<X<? extends java.lang.Number>>, kindname.class, Capture, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: X<X<? extends java.lang.Number>>, X<X<T>>))
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/CastFail.java	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4916607
+ * @summary Test casts (errors)
+ * @author gafter
+ *
+ * @compile/fail/ref=CastFail.out -XDrawDiagnostics CastFail.java
+ */
+
+import java.util.*;
+
+class CastFail {
+
+    // --- Directly transferring parameters ---
+
+    private class AA<T> { }
+
+    private class AB<T> extends AA<T> { }
+    private class AC<T> extends AA<Vector<T>> { }
+    private class AD<T> extends AA<Vector<? extends T>> { }
+    private class AE<T> extends AA<Vector<? super T>> { }
+    private class AF<T> extends AA<T[]> { }
+    private class AG<T> extends AA<String> { }
+
+    private void parameterTransfer() {
+        Object o;
+
+        o = (AB<String>) (AA<Number>) null; // <<fail 1>>
+        o = (AC<String>) (AA<Vector<Number>>) null; // <<fail 2>>
+        o = (AC<String>) (AA<Stack<String>>) null; // <<fail 3>>
+        o = (AD<String>) (AA<Vector<? extends Number>>) null; // <<fail 4>>
+        o = (AE<Number>) (AA<Vector<? super String>>) null; // <<fail 5>>
+        o = (AF<String>) (AA<Number[]>) null; // <<fail 6>>
+        o = (AG<?>) (AA<Number>) null; // <<fail 7>>
+    }
+
+    // --- Inconsistent matches ---
+
+    private class BA<T> { }
+    private class BB<T, S> { }
+
+    private class BC<T> extends BA<Integer> { }
+    private class BD<T> extends BB<T, T> { }
+
+    private void inconsistentMatches() {
+        Object o;
+
+        o = (BC<?>) (BA<String>) null; // <<fail 8>>
+        o = (BD<String>) (BB<String, Number>) null; // <<fail 9>>
+        o = (BD<String>) (BB<Number, String>) null; // <<fail 10>>
+    }
+
+    // --- Transferring parameters via supertypes ---
+
+    private interface CA<T> { }
+    private interface CB<T> extends CA<T> { }
+    private interface CC<T> extends CA<T> { }
+
+    private class CD<T> implements CB<T> { }
+    private interface CE<T> extends CC<T> { }
+
+    private interface CF<S> { }
+    private interface CG<T> { }
+    private class CH<S, T> implements CF<S>, CG<T> { }
+    private interface CI<S> extends CF<S> { }
+    private interface CJ<T> extends CG<T> { }
+    private interface CK<S, T> extends CI<S>, CJ<T> { }
+
+    private void supertypeParameterTransfer() {
+        Object o;
+        CD<?> cd = (CE<?>) null; // <<fail 11>>
+        CE<?> ce = (CD<?>) null; // <<fail 12>>
+        o = (CE<Number>) (CD<String>) null; // <<fail 13>>
+
+        // 4916622: unnecessary warning with cast
+        // o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
+    }
+
+    // --- Disjoint ---
+
+    private interface DA<T> { }
+    private interface DB<T> extends DA<T> { }
+    private interface DC<T> extends DA<Integer> { }
+
+    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
+        Object o;
+
+        // Classes
+        o = (DA<Number>) (DA<Integer>) null; // <<fail 14>>
+        o = (DA<? extends Integer>) (DA<Number>) null; // <<fail 15>>
+        o = (DA<? super Number>) (DA<Integer>) null; // <<fail 16>>
+        o = (DA<? extends Runnable>) (DA<? extends String>) null; // <<fail 17>>
+        o = (DA<? super Number>) (DA<? extends Integer>) null; // <<fail 18>>
+
+        // Typevars
+        o = (DA<? extends String>) (DA<I>) null; // <<fail 19>>
+        o = (DA<S>) (DA<R>) null; // <<fail 20>>
+
+        // Raw (asymmetrical!)
+        o = (DC<?>) (DA<? super String>) null; // <<fail 21>>
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/CastFail.out	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,22 @@
+CastFail.java:51:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.lang.Number>, CastFail.AB<java.lang.String>)
+CastFail.java:52:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Vector<java.lang.Number>>, CastFail.AC<java.lang.String>)
+CastFail.java:53:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Stack<java.lang.String>>, CastFail.AC<java.lang.String>)
+CastFail.java:54:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Vector<? extends java.lang.Number>>, CastFail.AD<java.lang.String>)
+CastFail.java:55:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Vector<? super java.lang.String>>, CastFail.AE<java.lang.Number>)
+CastFail.java:56:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.lang.Number[]>, CastFail.AF<java.lang.String>)
+CastFail.java:57:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.lang.Number>, CastFail.AG<?>)
+CastFail.java:71:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.BA<java.lang.String>, CastFail.BC<?>)
+CastFail.java:72:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.BB<java.lang.String,java.lang.Number>, CastFail.BD<java.lang.String>)
+CastFail.java:73:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.BB<java.lang.Number,java.lang.String>, CastFail.BD<java.lang.String>)
+CastFail.java:94:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.CE<compiler.misc.type.captureof: 1, ?>, CastFail.CD<?>)
+CastFail.java:95:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.CD<compiler.misc.type.captureof: 1, ?>, CastFail.CE<?>)
+CastFail.java:96:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.CD<java.lang.String>, CastFail.CE<java.lang.Number>)
+CastFail.java:112:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<java.lang.Integer>, CastFail.DA<java.lang.Number>)
+CastFail.java:113:37: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<java.lang.Number>, CastFail.DA<? extends java.lang.Integer>)
+CastFail.java:114:34: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<java.lang.Integer>, CastFail.DA<? super java.lang.Number>)
+CastFail.java:115:38: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<compiler.misc.type.captureof: 1, ? extends java.lang.String>, CastFail.DA<? extends java.lang.Runnable>)
+CastFail.java:116:34: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<compiler.misc.type.captureof: 1, ? extends java.lang.Integer>, CastFail.DA<? super java.lang.Number>)
+CastFail.java:119:36: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<I>, CastFail.DA<? extends java.lang.String>)
+CastFail.java:120:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<R>, CastFail.DA<S>)
+CastFail.java:123:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<compiler.misc.type.captureof: 1, ? super java.lang.String>, CastFail.DC<?>)
+21 errors
--- a/test/tools/javac/generics/wildcards/neg/CastFail1.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail1.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AB<String>) (AA<Number>) null; // <<fail 1>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail10.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail10.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Inconsistent matches ---
-
-    private class BA<T> { }
-    private class BB<T, S> { }
-
-    private class BC<T> extends BA<Integer> { }
-    private class BD<T> extends BB<T, T> { }
-
-    private void inconsistentMatches() {
-        Object o;
-
-        o = (BD<String>) (BB<Number, String>) null; // <<fail 10>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail11.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail11.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Transferring parameters via supertypes ---
-
-    private interface CA<T> { }
-    private interface CB<T> extends CA<T> { }
-    private interface CC<T> extends CA<T> { }
-
-    private class CD<T> implements CB<T> { }
-    private interface CE<T> extends CC<T> { }
-
-    private interface CF<S> { }
-    private interface CG<T> { }
-    private class CH<S, T> implements CF<S>, CG<T> { }
-    private interface CI<S> extends CF<S> { }
-    private interface CJ<T> extends CG<T> { }
-    private interface CK<S, T> extends CI<S>, CJ<T> { }
-
-    private void supertypeParameterTransfer() {
-        Object o;
-        CD<?> cd = (CE<?>) null; // <<fail 11>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail12.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail12.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Transferring parameters via supertypes ---
-
-    private interface CA<T> { }
-    private interface CB<T> extends CA<T> { }
-    private interface CC<T> extends CA<T> { }
-
-    private class CD<T> implements CB<T> { }
-    private interface CE<T> extends CC<T> { }
-
-    private interface CF<S> { }
-    private interface CG<T> { }
-    private class CH<S, T> implements CF<S>, CG<T> { }
-    private interface CI<S> extends CF<S> { }
-    private interface CJ<T> extends CG<T> { }
-    private interface CK<S, T> extends CI<S>, CJ<T> { }
-
-    private void supertypeParameterTransfer() {
-        Object o;
-        CE<?> ce = (CD<?>) null; // <<fail 12>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail13.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail13.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Transferring parameters via supertypes ---
-
-    private interface CA<T> { }
-    private interface CB<T> extends CA<T> { }
-    private interface CC<T> extends CA<T> { }
-
-    private class CD<T> implements CB<T> { }
-    private interface CE<T> extends CC<T> { }
-
-    private interface CF<S> { }
-    private interface CG<T> { }
-    private class CH<S, T> implements CF<S>, CG<T> { }
-    private interface CI<S> extends CF<S> { }
-    private interface CJ<T> extends CG<T> { }
-    private interface CK<S, T> extends CI<S>, CJ<T> { }
-
-    private void supertypeParameterTransfer() {
-        Object o;
-        o = (CE<Number>) (CD<String>) null; // <<fail 13>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail14.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail14.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        // Classes
-        o = (DA<Number>) (DA<Integer>) null; // <<fail 14>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail15.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail15.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        o = (DA<? extends Integer>) (DA<Number>) null; // <<fail 15>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail16.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail16.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        o = (DA<? super Number>) (DA<Integer>) null; // <<fail 16>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail17.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail17.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        o = (DA<? extends Runnable>) (DA<? extends String>) null; // <<fail 17>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail18.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail18.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        o = (DA<? super Number>) (DA<? extends Integer>) null; // <<fail 18>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail19.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail19.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        o = (DA<? extends String>) (DA<I>) null; // <<fail 19>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail2.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail2.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AC<String>) (AA<Vector<Number>>) null; // <<fail 2>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail20.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail20.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        o = (DA<S>) (DA<R>) null; // <<fail 20>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail21.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail20.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        o = (DC<?>) (DA<? super String>) null; // <<fail 21>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail3.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail3.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AC<String>) (AA<Stack<String>>) null; // <<fail 3>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail4.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail4.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AD<String>) (AA<Vector<? extends Number>>) null; // <<fail 4>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail5.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail5.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AE<Number>) (AA<Vector<? super String>>) null; // <<fail 5>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail6.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail6.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AF<String>) (AA<Number[]>) null; // <<fail 6>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail7.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail7.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AG<?>) (AA<Number>) null; // <<fail 7>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail8.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail8.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Inconsistent matches ---
-
-    private class BA<T> { }
-    private class BB<T, S> { }
-
-    private class BC<T> extends BA<Integer> { }
-    private class BD<T> extends BB<T, T> { }
-
-    private void inconsistentMatches() {
-        Object o;
-
-        o = (BC<?>) (BA<String>) null; // <<fail 8>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/CastFail9.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  CastFail9.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Inconsistent matches ---
-
-    private class BA<T> { }
-    private class BB<T, S> { }
-
-    private class BC<T> extends BA<Integer> { }
-    private class BD<T> extends BB<T, T> { }
-
-    private void inconsistentMatches() {
-        Object o;
-
-        o = (BD<String>) (BB<String, Number>) null; // <<fail 9>>
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/CastTest.java	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4916607
+ * @summary Test casts (legal)
+ * @author gafter
+ *
+ * @compile CastTest.java
+ */
+
+import java.util.*;
+
+class CastTest {
+
+    // --- Directly transferring parameters ---
+
+    private class AA<T> { }
+
+    private class AB<T> extends AA<T> { }
+    private class AC<T> extends AA<Vector<T>> { }
+    private class AD<T> extends AA<Vector<? extends T>> { }
+    private class AE<T> extends AA<Vector<? super T>> { }
+    private class AF<T> extends AA<T[]> { }
+    private class AG<T> extends AA<String> { }
+
+    private void parameterTransfer() {
+        Object o;
+
+        o = (AB<String>) (AA<String>) null; // <<pass>>
+        o = (AC<String>) (AA<Vector<String>>) null; // <<pass>>
+        o = (AD<Number>) (AA<Vector<? extends Number>>) null; // <<pass>>
+        o = (AD<?>) (AA<Vector<? extends Object>>) null; // <<pass>>
+        o = (AD<Object>) (AA<Vector<?>>) null; // <<pass>>
+        o = (AE<String>) (AA<Vector<? super String>>) null; // <<pass>>
+        o = (AF<String>) (AA<String[]>) null; // <<pass>>
+        o = (AG<?>) (AA<String>) null; // <<pass>>
+    }
+
+    // --- Inconsistent matches ---
+
+    private class BA<T> { }
+    private class BB<T, S> { }
+
+    private class BC<T> extends BA<Integer> { }
+    private class BD<T> extends BB<T, T> { }
+
+    private void inconsistentMatches() {
+        Object o;
+
+        o = (BC<?>) (BA<Integer>) null; // <<pass>>
+        o = (BD<String>) (BB<String, String>) null; // <<pass>>
+    }
+
+    private void whyMustEverythingBeSo_______Complicated() {
+        // This has to work...
+        BD<Number> bd = new BD<Number>();
+        BB<? extends Number, ? super Integer> bb = bd;
+        // 4916620: wildcards: legal cast is rejected
+        // bd = (BD<Number>) bb; // <<warn>> <<todo: cast-infer>>
+    }
+
+    // --- Transferring parameters via supertypes ---
+
+    private interface CA<T> { }
+    private interface CB<T> extends CA<T> { }
+    private interface CC<T> extends CA<T> { }
+
+    private class CD<T> implements CB<T> { }
+    private interface CE<T> extends CC<T> { }
+
+    private interface CF<S> { }
+    private interface CG<T> { }
+    private class CH<S, T> implements CF<S>, CG<T> { }
+    private interface CI<S> extends CF<S> { }
+    private interface CJ<T> extends CG<T> { }
+    private interface CK<S, T> extends CI<S>, CJ<T> { }
+
+    private void supertypeParameterTransfer() {
+        Object o;
+        o = (CE<String>) (CD<String>) null; // <<pass>>
+
+        // 4916622: unnecessary warning with cast
+        // o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
+    }
+
+    // --- Disjoint ---
+
+    private interface DA<T> { }
+    private interface DB<T> extends DA<T> { }
+    private interface DC<T> extends DA<Integer> { }
+
+    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
+        Object o;
+
+        // Classes
+        o = (DA<? extends Number>) (DA<Integer>) null; // <<pass>>
+        o = (DA<? super Integer>) (DA<Number>) null; // <<pass>>
+        o = (DA<?>) (DA<Integer>) null; // <<pass>>
+        o = (DA<?>) (DA<? extends Integer>) null; // <<pass>>
+        o = (DA<?>) (DA<? super String>) null; // <<pass>>
+        o = (DA<?>) (DA<?>) null; // <<pass>>
+
+        // Typevars
+        o = (DA<? extends Number>) (DA<I>) null; // <<pass>>
+
+        // Raw (asymmetrical!)
+        o = (DA) (DB<Number>) null; // <<pass>>
+        o = (DA<?>) (DB) null; // <<pass>>
+        o = (DA<? extends Object>) (DB) null; // <<pass>>
+        o = (DB) (DA<Number>) null; // <<pass>>
+        o = (DB<?>) (DA) null; // <<pass>>
+        o = (DB<? extends Object>) (DA) null; // <<pass>>
+        o = (DC<?>) (DA<?>) null; // <<pass>>
+    }
+
+}
--- a/test/tools/javac/generics/wildcards/neg/CastWarn14.java	Fri May 15 17:47:03 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail  -Werror -Xlint:unchecked CastWarn14.java
- */
-
-import java.util.*;
-
-class CastTest {
-
-    // --- Directly transferring parameters ---
-
-    private class AA<T> { }
-
-    private class AB<T> extends AA<T> { }
-    private class AC<T> extends AA<Vector<T>> { }
-    private class AD<T> extends AA<Vector<? extends T>> { }
-    private class AE<T> extends AA<Vector<? super T>> { }
-    private class AF<T> extends AA<T[]> { }
-    private class AG<T> extends AA<String> { }
-
-    private void parameterTransfer() {
-        Object o;
-
-        o = (AB<String>) (AA<String>) null; // <<pass>>
-        o = (AB<String>) (AA<Number>) null; // <<fail 1>>
-        o = (AC<String>) (AA<Vector<String>>) null; // <<pass>>
-        o = (AC<String>) (AA<Vector<Number>>) null; // <<fail 2>>
-        o = (AC<String>) (AA<Stack<String>>) null; // <<fail 3>>
-
-        o = (AD<Number>) (AA<Vector<? extends Number>>) null; // <<pass>>
-        o = (AD<String>) (AA<Vector<? extends Number>>) null; // <<fail 4>>
-        o = (AD<?>) (AA<Vector<? extends Object>>) null; // <<pass>>
-        o = (AD<Object>) (AA<Vector<?>>) null; // <<pass>>
-
-        o = (AE<String>) (AA<Vector<? super String>>) null; // <<pass>>
-        o = (AE<Number>) (AA<Vector<? super String>>) null; // <<fail 5>>
-
-        o = (AF<String>) (AA<String[]>) null; // <<pass>>
-        o = (AF<String>) (AA<Number[]>) null; // <<fail 6>>
-
-        o = (AG<?>) (AA<String>) null; // <<pass>>
-        o = (AG<?>) (AA<Number>) null; // <<fail 7>>
-    }
-
-    // --- Inconsistent matches ---
-
-    private class BA<T> { }
-    private class BB<T, S> { }
-
-    private class BC<T> extends BA<Integer> { }
-    private class BD<T> extends BB<T, T> { }
-
-    private void inconsistentMatches() {
-        Object o;
-
-        o = (BC<?>) (BA<Integer>) null; // <<pass>>
-        o = (BC<?>) (BA<String>) null; // <<fail 8>>
-        o = (BD<String>) (BB<String, String>) null; // <<pass>>
-        o = (BD<String>) (BB<String, Number>) null; // <<fail 9>>
-        o = (BD<String>) (BB<Number, String>) null; // <<fail 10>>
-    }
-
-    private void whyMustEverythingBeSo_______Complicated() {
-        // This has to work...
-        BD<Number> bd = new BD<Number>();
-        BB<? extends Number, ? super Integer> bb = bd;
-        // 4916620: wildcards: legal cast is rejected
-        // bd = (BD<Number>) bb; // <<warn>> <<todo: cast-infer>>
-    }
-
-    // --- Transferring parameters via supertypes ---
-
-    private interface CA<T> { }
-    private interface CB<T> extends CA<T> { }
-    private interface CC<T> extends CA<T> { }
-
-    private class CD<T> implements CB<T> { }
-    private interface CE<T> extends CC<T> { }
-
-    private interface CF<S> { }
-    private interface CG<T> { }
-    private class CH<S, T> implements CF<S>, CG<T> { }
-    private interface CI<S> extends CF<S> { }
-    private interface CJ<T> extends CG<T> { }
-    private interface CK<S, T> extends CI<S>, CJ<T> { }
-
-    private void supertypeParameterTransfer() {
-        Object o;
-        CD<?> cd = (CE<?>) null; // <<fail 11>>
-        CE<?> ce = (CD<?>) null; // <<fail 12>>
-        o = (CE<String>) (CD<String>) null; // <<pass>>
-        o = (CE<Number>) (CD<String>) null; // <<fail 13>>
-
-        // 4916622: unnecessary warning with cast
-        // o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
-    }
-
-    // --- Disjoint ---
-
-    private interface DA<T> { }
-    private interface DB<T> extends DA<T> { }
-    private interface DC<T> extends DA<Integer> { }
-
-    private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
-        Object o;
-
-        // Classes
-        o = (DA<Number>) (DA<Integer>) null; // <<fail 14>>
-        o = (DA<? extends Number>) (DA<Integer>) null; // <<pass>>
-        o = (DA<? extends Integer>) (DA<Number>) null; // <<fail 15>>
-        o = (DA<? super Integer>) (DA<Number>) null; // <<pass>>
-        o = (DA<? super Number>) (DA<Integer>) null; // <<fail 16>>
-        o = (DA<?>) (DA<Integer>) null; // <<pass>>
-
-        o = (DA<? extends Runnable>) (DA<? extends String>) null; // <<fail 17>>
-
-        o = (DA<? super Number>) (DA<? extends Integer>) null; // <<fail 18>>
-        o = (DA<?>) (DA<? extends Integer>) null; // <<pass>>
-
-        o = (DA<?>) (DA<? super String>) null; // <<pass>>
-
-        o = (DA<?>) (DA<?>) null; // <<pass>>
-
-        // Typevars
-        o = (DA<? extends Number>) (DA<I>) null; // <<pass>>
-        o = (DA<? extends String>) (DA<I>) null; // <<fail 19>>
-
-        o = (DA<S>) (DA<R>) null; // <<fail 20>>
-
-        // Raw (asymmetrical!)
-        o = (DA) (DB<Number>) null; // <<pass>>
-        o = (DA<?>) (DB) null; // <<pass>>
-        o = (DA<? extends Object>) (DB) null; // <<pass>>
-
-        o = (DB) (DA<Number>) null; // <<pass>>
-        o = (DB<?>) (DA) null; // <<pass>>
-        o = (DB<? extends Object>) (DA) null; // <<pass>>
-
-        o = (DC<?>) (DA<?>) null; // <<pass>>
-        o = (DC<?>) (DA<? super String>) null; // <<fail 21>>
-    }
-
-}
--- a/test/tools/javac/generics/wildcards/neg/ParamCast.java	Fri May 15 17:47:03 2015 -0700
+++ b/test/tools/javac/generics/wildcards/neg/ParamCast.java	Fri May 15 18:03:51 2015 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 4916567
- * @summary Description
+ * @summary integrate improved wildcard substitution from CPH
  * @author gafter
  *
- * @compile/fail  ParamCast.java
+ * @compile/fail/ref=ParamCast.out -XDrawDiagnostics ParamCast.java
  */
 
 class A<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/ParamCast.out	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,2 @@
+ParamCast.java:15:36: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: A<java.lang.String>, B<?,java.lang.Integer>)
+1 error
--- a/test/tools/javac/generics/wildcards/neg/Readonly.java	Fri May 15 17:47:03 2015 -0700
+++ b/test/tools/javac/generics/wildcards/neg/Readonly.java	Fri May 15 18:03:51 2015 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 4916607 4931647
  * @summary an extends-bound (covariant) wildcard is like readonly
  * @author gafter
  *
- * @compile/fail  Readonly.java
+ * @compile/fail/ref=Readonly.out -XDrawDiagnostics Readonly.java
  */
 
 class Err<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/Readonly.out	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,2 @@
+Readonly.java:15:10: compiler.err.cant.apply.symbol: kindname.method, put, Err<compiler.misc.type.captureof: 1, ? extends java.lang.String>, Err<compiler.misc.type.captureof: 2, ? extends java.lang.String>, kindname.class, Err<T>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: Err<compiler.misc.type.captureof: 2, ? extends java.lang.String>, Err<compiler.misc.type.captureof: 1, ? extends java.lang.String>))
+1 error
--- a/test/tools/javac/generics/wildcards/neg/Unbounded.java	Fri May 15 17:47:03 2015 -0700
+++ b/test/tools/javac/generics/wildcards/neg/Unbounded.java	Fri May 15 18:03:51 2015 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 4916607
  * @summary an unbounded (bivariant) wildcard doesn't allow reading
  * @author gafter
  *
- * @compile/fail  Unbounded.java
+ * @compile/fail/ref=Unbounded.out -XDrawDiagnostics Unbounded.java
  */
 
 import java.util.Stack;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/neg/Unbounded.out	Fri May 15 18:03:51 2015 -0700
@@ -0,0 +1,2 @@
+Unbounded.java:14:29: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.captureof: 1, ?, java.lang.String)
+1 error