# HG changeset patch # User lana # Date 1402022297 25200 # Node ID abd9a49d0b9c38ef844ac81ee0ec08307fa53fe0 # Parent f3198fd675b61d8a556bc181fe7aef30003ff5ba# Parent 0b3923dd7afd26bc4031c7677a6e981313f5c181 Merge diff -r f3198fd675b6 -r abd9a49d0b9c langtools/src/share/classes/com/sun/tools/javac/code/Flags.java --- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, 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 diff -r f3198fd675b6 -r abd9a49d0b9c langtools/src/share/classes/com/sun/tools/javac/code/Type.java --- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java Thu Jun 05 19:38:17 2014 -0700 @@ -72,13 +72,28 @@ public abstract class Type extends AnnoConstruct implements TypeMirror { /** Constant type: no type at all. */ - public static final JCNoType noType = new JCNoType(); + public static final JCNoType noType = new JCNoType() { + @Override + public String toString() { + return "none"; + } + }; /** Constant type: special type to be used during recovery of deferred expressions. */ - public static final JCNoType recoveryType = new JCNoType(); + public static final JCNoType recoveryType = new JCNoType(){ + @Override + public String toString() { + return "recovery"; + } + }; /** Constant type: special type to be used for marking stuck trees. */ - public static final JCNoType stuckType = new JCNoType(); + public static final JCNoType stuckType = new JCNoType() { + @Override + public String toString() { + return "stuck"; + } + }; public static final List noAnnotations = List.nil(); diff -r f3198fd675b6 -r abd9a49d0b9c langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Thu Jun 05 19:38:17 2014 -0700 @@ -2060,7 +2060,7 @@ tree.constructor = constructor.baseSymbol(); final TypeSymbol csym = clazztype.tsym; - ResultInfo diamondResult = new ResultInfo(MTH, newMethodTemplate(resultInfo.pt, argtypes, typeargtypes), new Check.NestedCheckContext(resultInfo.checkContext) { + ResultInfo diamondResult = new ResultInfo(pkind, newMethodTemplate(resultInfo.pt, argtypes, typeargtypes), new Check.NestedCheckContext(resultInfo.checkContext) { @Override public void report(DiagnosticPosition _unused, JCDiagnostic details) { enclosingContext.report(tree.clazz, diff -r f3198fd675b6 -r abd9a49d0b9c langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Thu Jun 05 19:38:17 2014 -0700 @@ -344,8 +344,10 @@ } private boolean commonSuperWithDiffParameterization(Type t, Type s) { - Pair supers = getParameterizedSupers(t, s); - return (supers != null && !types.isSameType(supers.fst, supers.snd)); + for (Pair supers : getParameterizedSupers(t, s)) { + if (!types.isSameType(supers.fst, supers.snd)) return true; + } + return false; } private Type generateReferenceToTargetConstraint(JCTree tree, UndetVar from, @@ -604,30 +606,38 @@ /** max number of incorporation rounds */ static final int MAX_INCORPORATION_STEPS = 100; - /* If for two types t and s there is a least upper bound that is a - * parameterized type G, then there exists a supertype of 't' of the form - * G and a supertype of 's' of the form G - * which will be returned by this method. If no such supertypes exists then - * null is returned. + /* If for two types t and s there is a least upper bound that contains + * parameterized types G1, G2 ... Gn, then there exists supertypes of 't' of the form + * G1, G2, ... Gn and supertypes of 's' of the form + * G1, G2, ... Gn which will be returned by this method. + * If no such common supertypes exists then an empty list is returned. * * As an example for the following input: * * t = java.util.ArrayList * s = java.util.List * - * we get this ouput: + * we get this ouput (singleton list): * - * Pair[java.util.List,java.util.List] + * [Pair[java.util.List,java.util.List]] */ - private Pair getParameterizedSupers(Type t, Type s) { + private List> getParameterizedSupers(Type t, Type s) { Type lubResult = types.lub(t, s); - if (lubResult == syms.errType || lubResult == syms.botType || - !lubResult.isParameterized()) { - return null; + if (lubResult == syms.errType || lubResult == syms.botType) { + return List.nil(); } - Type asSuperOfT = types.asSuper(t, lubResult.tsym); - Type asSuperOfS = types.asSuper(s, lubResult.tsym); - return new Pair<>(asSuperOfT, asSuperOfS); + List supertypesToCheck = lubResult.isCompound() ? + ((IntersectionClassType)lubResult).getComponents() : + List.of(lubResult); + ListBuffer> commonSupertypes = new ListBuffer<>(); + for (Type sup : supertypesToCheck) { + if (sup.isParameterized()) { + Type asSuperOfT = types.asSuper(t, sup.tsym); + Type asSuperOfS = types.asSuper(s, sup.tsym); + commonSupertypes.add(new Pair<>(asSuperOfT, asSuperOfS)); + } + } + return commonSupertypes.toList(); } /** @@ -813,16 +823,17 @@ Type b1 = boundList.head; Type b2 = tmpTail.head; if (b1 != b2) { - Pair commonSupers = infer.getParameterizedSupers(b1, b2); - if (commonSupers != null) { + for (Pair commonSupers : infer.getParameterizedSupers(b1, b2)) { List allParamsSuperBound1 = commonSupers.fst.allparams(); List allParamsSuperBound2 = commonSupers.snd.allparams(); while (allParamsSuperBound1.nonEmpty() && allParamsSuperBound2.nonEmpty()) { //traverse the list of all params comparing them if (!allParamsSuperBound1.head.hasTag(WILDCARD) && !allParamsSuperBound2.head.hasTag(WILDCARD)) { - isSameType(inferenceContext.asUndetVar(allParamsSuperBound1.head), - inferenceContext.asUndetVar(allParamsSuperBound2.head), infer); + if (!isSameType(inferenceContext.asUndetVar(allParamsSuperBound1.head), + inferenceContext.asUndetVar(allParamsSuperBound2.head), infer)) { + infer.reportBoundError(uv, BoundErrorKind.BAD_UPPER); + } } allParamsSuperBound1 = allParamsSuperBound1.tail; allParamsSuperBound2 = allParamsSuperBound2.tail; diff -r f3198fd675b6 -r abd9a49d0b9c langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/CaptureInSubtype.java --- a/langtools/test/tools/javac/CaptureInSubtype.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/CaptureInSubtype.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2004, 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 5044157 + * @test /nodynamiccopyright/ + * @bug 5044626 * @summary type system loophole in wildcard substitution * @author Gilad Bracha * - * @compile/fail CaptureInSubtype.java + * @compile/fail/ref=CaptureInSubtype.out -XDrawDiagnostics CaptureInSubtype.java */ import java.util.List; diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/CaptureInSubtype.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/CaptureInSubtype.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +CaptureInSubtype.java:38:17: compiler.err.override.incompatible.ret: (compiler.misc.cant.override: m(), CaptureInSubtype.ShowFlaw, m(), CaptureInSubtype.SuperOfShowFlaw), CaptureInSubtype.Flaw, CaptureInSubtype.SuperOfFlaw> +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/InconsistentReturn.java --- a/langtools/test/tools/javac/OverrideChecks/InconsistentReturn.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/OverrideChecks/InconsistentReturn.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,34 +1,11 @@ /* - * Copyright (c) 1997, 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 4041948 + * @test /nodynamiccopyright/ + * @bug 4041948 * @summary javac previously allowed interfaces to inherit methods with * inconsistent return types. - * @author turnidge + * @author turnidge * - * @compile/fail InconsistentReturn.java + * @compile/fail/ref=InconsistentReturn.out -XDrawDiagnostics InconsistentReturn.java */ interface I1{ int f(); diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/InconsistentReturn.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/OverrideChecks/InconsistentReturn.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +InconsistentReturn.java:17:1: compiler.err.types.incompatible.diff.ret: I2, I1, f() +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/Private.java --- a/langtools/test/tools/javac/OverrideChecks/Private.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/OverrideChecks/Private.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,32 +1,9 @@ /* - * Copyright (c) 2006, 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 6399361 * @summary java.lang.Override specification should be revised * @author Peter von der Ah\u00e9 - * @compile/fail Private.java + * @compile/fail/ref=Private.out -XDrawDiagnostics Private.java */ public class Private { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/Private.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/OverrideChecks/Private.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +Private.java:14:5: compiler.err.method.does.not.override.superclass +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/StaticOverride.java --- a/langtools/test/tools/javac/OverrideChecks/StaticOverride.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/OverrideChecks/StaticOverride.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,34 +1,11 @@ /* - * Copyright (c) 1997, 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 4041948 4022450 + * @test /nodynamiccopyright/ + * @bug 4041948 4022450 * @summary javac previously allowed static methods to override non-static * methods in some cases. - * @author turnidge + * @author turnidge * - * @compile/fail StaticOverride.java + * @compile/fail/ref=StaticOverride.out -XDrawDiagnostics StaticOverride.java */ interface I{ int f(); diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/StaticOverride.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/OverrideChecks/StaticOverride.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +StaticOverride.java:20:1: compiler.err.override.static: (compiler.misc.cant.implement: f(), C, f(), I) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/T4720356a.java --- a/langtools/test/tools/javac/OverrideChecks/T4720356a.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/OverrideChecks/T4720356a.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2002, 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). + * @test /nodynamiccopyright/ + * @bug 4720356 + * @summary compiler fails to check cross-package overriding + * @author gafter * - * 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 4720356 - * @summary compiler fails to check cross-package overriding - * @author gafter - * - * @compile/fail T4720356a.java T4720356b.java + * @compile/fail/ref=T4720356a.out -XDrawDiagnostics T4720356a.java T4720356b.java */ package p1; diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/T4720356a.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/OverrideChecks/T4720356a.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T4720356a.java:16:16: compiler.err.override.incompatible.ret: (compiler.misc.cant.override: m(), p1.T4720356c, m(), p1.T4720356a), int, void +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/T4720359a.java --- a/langtools/test/tools/javac/OverrideChecks/T4720359a.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/OverrideChecks/T4720359a.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2002, 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). + * @test /nodynamiccopyright/ + * @bug 4720359 + * @summary javac fails to check cross-package hiding + * @author gafter * - * 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 4720359 - * @summary javac fails to check cross-package hiding - * @author gafter - * - * @compile/fail T4720359a.java T4720359b.java + * @compile/fail/ref=T4720359a.out -XDrawDiagnostics T4720359a.java T4720359b.java */ package p1; diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/T4720359a.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/OverrideChecks/T4720359a.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T4720359a.java:16:23: compiler.err.override.incompatible.ret: (compiler.misc.cant.override: m(), p1.T4720359c, m(), p1.T4720359a), int, void +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/T4721069.java --- a/langtools/test/tools/javac/OverrideChecks/T4721069.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/OverrideChecks/T4721069.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2002, 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). + * @test /nodynamiccopyright/ + * @bug 4721069 + * @summary javac allows an interface to override a final method in Object + * @author gafter * - * 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 4721069 - * @summary javac allows an interface to override a final method in Object - * @author gafter - * - * @compile/fail T4721069.java + * @compile/fail/ref=T4721069.out -XDrawDiagnostics T4721069.java */ interface I { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/T4721069.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/OverrideChecks/T4721069.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T4721069.java:11:11: compiler.err.override.meth: (compiler.misc.cant.override: getClass(), I, getClass(), java.lang.Object), final +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/ThrowsConflict.java --- a/langtools/test/tools/javac/OverrideChecks/ThrowsConflict.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/OverrideChecks/ThrowsConflict.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 1997, 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). + * @test /nodynamiccopyright/ + * @bug 4022674 + * @summary Compiler should detect throws-clauses' conflict. + * @author turnidge * - * 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 4022674 - * @summary Compiler should detect throws-clauses' conflict. - * @author turnidge - * - * @compile/fail ThrowsConflict.java + * @compile/fail/ref=ThrowsConflict.out -XDrawDiagnostics ThrowsConflict.java */ interface I { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/OverrideChecks/ThrowsConflict.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/OverrideChecks/ThrowsConflict.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +ThrowsConflict.java:20:1: compiler.err.override.meth.doesnt.throw: (compiler.misc.cant.implement: method(), A, method(), I), java.lang.Exception +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/api/6410643/T6410643.java --- a/langtools/test/tools/javac/api/6410643/T6410643.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/api/6410643/T6410643.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2014, 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 @@ -40,7 +40,7 @@ Iterable classes, Iterable compilationUnits) { try { - task = tool.getTask(null, null, null, null, null, singleton((JavaFileObject)null)); + task = tool.getTask(null, null, null, options, classes, compilationUnits); throw new AssertionError("Error expected"); } catch (NullPointerException e) { System.err.println("Expected error occurred: " + e); diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/capture/Capture2.java --- a/langtools/test/tools/javac/capture/Capture2.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/capture/Capture2.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2004, 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 5029773 - * @summary soundness problem with failure to subsitute wildcard as type formal argument + * @summary soundness problem with failure to substitute wildcard as type formal argument * @author gafter * - * @compile/fail Capture2.java + * @compile/fail/ref=Capture2.out -XDrawDiagnostics Capture2.java */ package capture2; diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/capture/Capture2.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/capture/Capture2.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +Capture2.java:17:23: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.captureof: 1, ?, T) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/capture/Martin.java --- a/langtools/test/tools/javac/capture/Martin.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/capture/Martin.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,32 +1,9 @@ -/* - * Copyright (c) 2006, 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 6384510 * @summary improper handling of wildcard captures * @author Martin Buchholz - * @compile/fail Martin.java + * @compile/fail/ref=Martin.out -XDrawDiagnostics Martin.java */ import java.util.List; diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/capture/Martin.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/capture/Martin.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +Martin.java:15:11: compiler.err.cant.apply.symbols: kindname.method, addAll, java.util.List,{(compiler.misc.inapplicable.method: kindname.method, java.util.Collection, addAll(java.util.Collection), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.List, java.util.Collection))),(compiler.misc.inapplicable.method: kindname.method, java.util.List, addAll(java.util.Collection), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.List, java.util.Collection))),(compiler.misc.inapplicable.method: kindname.method, java.util.List, addAll(int,java.util.Collection), (compiler.misc.arg.length.mismatch))} +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/capture/T6594284.java --- a/langtools/test/tools/javac/capture/T6594284.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/capture/T6594284.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2008, 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 6594284 * @summary NPE thrown when calling a method on an intersection type * @author Maurizio Cimadamore * - * @compile/fail T6594284.java + * @compile/fail/ref=T6594284.out -XDrawDiagnostics T6594284.java */ public class T6594284 { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/capture/T6594284.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/capture/T6594284.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T6594284.java:18:24: compiler.err.not.within.bounds: ? extends T6594284.E, T +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/5064736/T5064736.java --- a/langtools/test/tools/javac/cast/5064736/T5064736.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/cast/5064736/T5064736.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,31 +1,8 @@ /* - * Copyright (c) 2005, 2006, 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 5064736 * @summary Incompatible types are cast without error - * @compile/fail T5064736.java + * @compile/fail/ref=T5064736.out -XDrawDiagnostics T5064736.java */ public class T5064736 { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/5064736/T5064736.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/5064736/T5064736.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T5064736.java:14:34: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T5064736.Foo, T5064736.Foo) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/6219964/T6219964.java --- a/langtools/test/tools/javac/cast/6219964/T6219964.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/cast/6219964/T6219964.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,31 +1,8 @@ /* - * Copyright (c) 2005, 2006, 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 6219964 * @summary Compiler allows illegal cast of anonymous inner class - * @compile/fail T6219964.java + * @compile/fail/ref=T6219964.out -XDrawDiagnostics T6219964.java */ public class T6219964 { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/6219964/T6219964.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/6219964/T6219964.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T6219964.java:13:27: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.anonymous.class: java.lang.Object, T6219964.I) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/6302956/T6302956.java --- a/langtools/test/tools/javac/cast/6302956/T6302956.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/cast/6302956/T6302956.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,31 +1,8 @@ /* - * Copyright (c) 2005, 2006, 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 6302956 * @summary Illegal cast allowed Properties -> Map - * @compile/fail T6302956.java + * @compile/fail/ref=T6302956.out -XDrawDiagnostics T6302956.java */ import java.util.Map; diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/6302956/T6302956.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/6302956/T6302956.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T6302956.java:12:57: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.util.Properties, java.util.Map) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/6548436/T6548436d.java --- a/langtools/test/tools/javac/cast/6548436/T6548436d.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/cast/6548436/T6548436d.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2008, 2010, 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 6548436 + * @test /nodynamiccopyright/ + * @bug 6548436 * @summary Incorrect inconvertible types error * @author Maurizio Cimadamore * - * @compile/fail T6548436d.java + * @compile/fail/ref=T6548436d.out -XDrawDiagnostics T6548436d.java */ public class T6548436d { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/6548436/T6548436d.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/6548436/T6548436d.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +T6548436d.java:15:35: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T6548436d.Base, T6548436d.Base) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/BoxedArray.java --- a/langtools/test/tools/javac/cast/BoxedArray.java Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/cast/BoxedArray.java Thu Jun 05 19:38:17 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2004, 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 5014309 * @summary REGRESSION: compiler allows cast from Integer[] to int[] * @author gafter * - * @compile/fail BoxedArray.java + * @compile/fail/ref=BoxedArray.out -XDrawDiagnostics BoxedArray.java */ public class BoxedArray { diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/cast/BoxedArray.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/BoxedArray.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +BoxedArray.java:13:22: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.Integer[], int[]) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/generics/diamond/T8041713/DiamondPlusUnexistingMethodRefCrashTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/generics/diamond/T8041713/DiamondPlusUnexistingMethodRefCrashTest.java Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,11 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8041713 + * @summary Type inference of non-existent method references crashes the compiler + * @compile/fail/ref=DiamondPlusUnexistingMethodRefCrashTest.out -XDrawDiagnostics DiamondPlusUnexistingMethodRefCrashTest.java + */ + +public class DiamondPlusUnexistingMethodRefCrashTest { + DiamondPlusUnexistingMethodRefCrashTest m = + new DiamondPlusUnexistingMethodRefCrashTest<>(DiamondPlusUnexistingMethodRefCrashTest::doNotExists); +} diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/generics/diamond/T8041713/DiamondPlusUnexistingMethodRefCrashTest.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/generics/diamond/T8041713/DiamondPlusUnexistingMethodRefCrashTest.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,2 @@ +DiamondPlusUnexistingMethodRefCrashTest.java:10:55: compiler.err.invalid.mref: kindname.method, (compiler.misc.cant.resolve.location.args: kindname.method, doNotExists, , , (compiler.misc.location: kindname.class, DiamondPlusUnexistingMethodRefCrashTest, null)) +1 error diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/generics/inference/8043893/T8043893.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/generics/inference/8043893/T8043893.java Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,43 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8043893 + * @summary Inference doesn't report error on incompatible upper bounds + * + * @compile -source 7 T8043893.java + * @compile/fail/ref=T8043893.out -Xlint:-options -XDrawDiagnostics -source 8 T8043893.java + */ + +class T8043893 { + + interface S1 { } + + interface S2 { } + + interface T0 { } + + interface T1 extends S1, S2 { } + + interface T2 extends S1, S2 { } + + interface T3 extends S1, S2 { } + + interface T4 extends S1 { } + + interface T5 extends S1 { } + + void m_intersection(T8043893 a) { } + + void m_class(T8043893 a) { } + + void test() { + //intersection type checks + m_intersection(new T8043893()); //ok in both 7 and 8 - Z = T1 + m_intersection(new T8043893()); //ok in 7, fails in 8 + m_intersection(new T8043893()); //ok in 7, fails in 8 + m_intersection(new T8043893()); //ok in both 7 and 8 - Z = T0 & T1 + //class type checks + m_class(new T8043893()); //ok in both 7 and 8 - Z = T4 + m_class(new T8043893()); //ok in 7, fails in 8 + m_class(new T8043893()); //ok in both 7 and 8 - Z = T0 & T4 + } +} diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/generics/inference/8043893/T8043893.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/generics/inference/8043893/T8043893.out Thu Jun 05 19:38:17 2014 -0700 @@ -0,0 +1,4 @@ +T8043893.java:35:9: compiler.err.cant.apply.symbol: kindname.method, m_intersection, T8043893, T8043893, kindname.class, T8043893, (compiler.misc.incompatible.upper.bounds: Z, T8043893.T2,T8043893.T1) +T8043893.java:36:9: compiler.err.cant.apply.symbol: kindname.method, m_intersection, T8043893, T8043893, kindname.class, T8043893, (compiler.misc.incompatible.upper.bounds: Z, T8043893.T3,T8043893.T1) +T8043893.java:40:9: compiler.err.cant.apply.symbol: kindname.method, m_class, T8043893, T8043893, kindname.class, T8043893, (compiler.misc.incompatible.upper.bounds: Z, T8043893.T5,T8043893.T4) +3 errors diff -r f3198fd675b6 -r abd9a49d0b9c langtools/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.out --- a/langtools/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.out Wed Jun 04 20:20:42 2014 -0700 +++ b/langtools/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.out Thu Jun 05 19:38:17 2014 -0700 @@ -3,37 +3,37 @@ EagerReturnTypeResolutionTestb.java:44:29: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:45:26: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:74:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I) -EagerReturnTypeResolutionTestb.java:75:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I,java.lang.Object) +EagerReturnTypeResolutionTestb.java:75:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:77:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I>>, EagerReturnTypeResolutionTestb.I,java.lang.Object)) EagerReturnTypeResolutionTestb.java:78:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I) -EagerReturnTypeResolutionTestb.java:79:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I,java.lang.Object) +EagerReturnTypeResolutionTestb.java:79:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:81:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I>>, EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:82:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I) -EagerReturnTypeResolutionTestb.java:83:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I,java.lang.Object) +EagerReturnTypeResolutionTestb.java:83:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:85:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I) EagerReturnTypeResolutionTestb.java:86:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,java.lang.Object)) EagerReturnTypeResolutionTestb.java:87:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I) EagerReturnTypeResolutionTestb.java:89:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:90:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.I) EagerReturnTypeResolutionTestb.java:91:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.J, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J) -EagerReturnTypeResolutionTestb.java:92:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.J, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J,java.lang.Object) +EagerReturnTypeResolutionTestb.java:92:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J,java.lang.Object) EagerReturnTypeResolutionTestb.java:94:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.J>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.J>>, EagerReturnTypeResolutionTestb.I,java.lang.Object)) EagerReturnTypeResolutionTestb.java:95:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.J, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J) -EagerReturnTypeResolutionTestb.java:96:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.J, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J,java.lang.Object) +EagerReturnTypeResolutionTestb.java:96:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J,java.lang.Object) EagerReturnTypeResolutionTestb.java:98:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.J>>, EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:99:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.J, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J) -EagerReturnTypeResolutionTestb.java:100:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.J, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J,java.lang.Object) +EagerReturnTypeResolutionTestb.java:100:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.J,EagerReturnTypeResolutionTestb.J,java.lang.Object) EagerReturnTypeResolutionTestb.java:102:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J) EagerReturnTypeResolutionTestb.java:103:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J) EagerReturnTypeResolutionTestb.java:104:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J) EagerReturnTypeResolutionTestb.java:105:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J) -EagerReturnTypeResolutionTestb.java:106:9: compiler.err.cant.apply.symbol: kindname.method, takeI, EagerReturnTypeResolutionTestb.I, java.lang.Object&EagerReturnTypeResolutionTestb.J&EagerReturnTypeResolutionTestb.K, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: java.lang.Integer, java.lang.Integer,java.lang.String) +EagerReturnTypeResolutionTestb.java:106:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J,java.lang.Object) EagerReturnTypeResolutionTestb.java:108:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I, EagerReturnTypeResolutionTestb.I>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I>>, EagerReturnTypeResolutionTestb.I,java.lang.Object)) EagerReturnTypeResolutionTestb.java:109:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J) -EagerReturnTypeResolutionTestb.java:110:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I, java.lang.Object&EagerReturnTypeResolutionTestb.J&EagerReturnTypeResolutionTestb.K, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object&EagerReturnTypeResolutionTestb.J&EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J,java.lang.Object)) +EagerReturnTypeResolutionTestb.java:110:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J,java.lang.Object) EagerReturnTypeResolutionTestb.java:112:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I>>, EagerReturnTypeResolutionTestb.I,java.lang.Object) EagerReturnTypeResolutionTestb.java:113:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J) -EagerReturnTypeResolutionTestb.java:114:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object&EagerReturnTypeResolutionTestb.J&EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.I,EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J,java.lang.Object) +EagerReturnTypeResolutionTestb.java:114:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List,java.util.List, java.util.List>,java.util.List, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J,java.lang.Object) EagerReturnTypeResolutionTestb.java:174:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer.no.conforming.instance.exists: , T, long)) EagerReturnTypeResolutionTestb.java:175:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer.no.conforming.instance.exists: , T, long)) EagerReturnTypeResolutionTestb.java:176:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer.no.conforming.instance.exists: , T, long))