diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java index 9bc7180ee50..250e816928a 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java @@ -995,7 +995,7 @@ public TypeBinding resolveType(BlockScope scope) { this.binding = scope.environment().updatePolymorphicMethodReturnType((PolymorphicMethodBinding) this.binding, TypeBinding.VOID); } } - if ((this.binding.tagBits & TagBits.HasMissingType) != 0) { + if ((this.binding.tagBits & TagBits.HasMissingType) != 0 && isMissingTypeRelevant()) { scope.problemReporter().missingTypeInMethod(this, this.binding); } if (!this.binding.isStatic()) { @@ -1112,6 +1112,21 @@ protected boolean isUnnecessaryReceiverCast(BlockScope scope, TypeBinding uncast || MethodVerifier.doesMethodOverride(otherMethod, this.binding, scope.environment()); } +protected boolean isMissingTypeRelevant() { + if ((this.binding.returnType.tagBits & TagBits.HasMissingType) == 0 + && this.binding.isVarargs()) { + if (this.arguments.length < this.binding.parameters.length) { + // are all but the irrelevant varargs type present? + for (int i = 0; i < this.arguments.length; i++) { + if ((this.binding.parameters[i].tagBits & TagBits.HasMissingType) != 0) + return true; // this one *is* relevant + } + return false; + } + } + return true; +} + protected TypeBinding handleNullnessCodePatterns(BlockScope scope, TypeBinding returnType) { // j.u.s.Stream.filter() may modify nullness of stream elements: if (this.binding.isWellknownMethod(TypeConstants.JAVA_UTIL_STREAM__STREAM, TypeConstants.FILTER) diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java index d2c917ee2c7..c8cb9f00ca8 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java @@ -1951,33 +1951,39 @@ MethodBinding resolveTypesFor(MethodBinding method) { if ((method.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0) return method; + boolean tolerateSave = this.environment.mayTolerateMissingType; + this.environment.mayTolerateMissingType = true; + try { - if (!method.isConstructor()) { - TypeBinding resolvedType = resolveType(method.returnType, this.environment, true /* raw conversion */); - method.returnType = resolvedType; - if ((resolvedType.tagBits & TagBits.HasMissingType) != 0) { - method.tagBits |= TagBits.HasMissingType; + if (!method.isConstructor()) { + TypeBinding resolvedType = resolveType(method.returnType, this.environment, true /* raw conversion */); + method.returnType = resolvedType; + if ((resolvedType.tagBits & TagBits.HasMissingType) != 0) { + method.tagBits |= TagBits.HasMissingType; + } } - } - for (int i = method.parameters.length; --i >= 0;) { - TypeBinding resolvedType = resolveType(method.parameters[i], this.environment, true /* raw conversion */); - method.parameters[i] = resolvedType; - if ((resolvedType.tagBits & TagBits.HasMissingType) != 0) { - method.tagBits |= TagBits.HasMissingType; + for (int i = method.parameters.length; --i >= 0;) { + TypeBinding resolvedType = resolveType(method.parameters[i], this.environment, true /* raw conversion */); + method.parameters[i] = resolvedType; + if ((resolvedType.tagBits & TagBits.HasMissingType) != 0) { + method.tagBits |= TagBits.HasMissingType; + } } - } - for (int i = method.thrownExceptions.length; --i >= 0;) { - ReferenceBinding resolvedType = (ReferenceBinding) resolveType(method.thrownExceptions[i], this.environment, true /* raw conversion */); - method.thrownExceptions[i] = resolvedType; - if ((resolvedType.tagBits & TagBits.HasMissingType) != 0) { - method.tagBits |= TagBits.HasMissingType; + for (int i = method.thrownExceptions.length; --i >= 0;) { + ReferenceBinding resolvedType = (ReferenceBinding) resolveType(method.thrownExceptions[i], this.environment, true /* raw conversion */); + method.thrownExceptions[i] = resolvedType; + if ((resolvedType.tagBits & TagBits.HasMissingType) != 0) { + method.tagBits |= TagBits.HasMissingType; + } } + for (int i = method.typeVariables.length; --i >= 0;) { + method.typeVariables[i].resolve(); + } + method.modifiers &= ~ExtraCompilerModifiers.AccUnresolved; + return method; + } finally { + this.environment.mayTolerateMissingType = tolerateSave; } - for (int i = method.typeVariables.length; --i >= 0;) { - method.typeVariables[i].resolve(); - } - method.modifiers &= ~ExtraCompilerModifiers.AccUnresolved; - return method; } @Override AnnotationBinding[] retrieveAnnotations(Binding binding) { diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java index 8eef8e72500..26ad94323ad 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java @@ -754,6 +754,7 @@ private boolean addConstraintsToC_OneExpr(Expression expri, Set Scope.NOT_COMPATIBLE) { + if ((scope.parameterCompatibilityLevel(substitute, arguments, false)) > Scope.NOT_COMPATIBLE) { // don't worry about NEEDS_MISSING_TYPE in 1.7 context methodSubstitute = substitute; } else { inferenceContext = oldContext; diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java index 5c550bf6247..fff08aa31cb 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java @@ -52,4 +52,5 @@ public interface ProblemReasons { final int InterfaceMethodInvocationNotBelow18 = 29; final int NotAccessible = 30; // JLS 6.6.1 - module aspects final int ErrorAlreadyReported = 31; + final int MissingTypeInSignature = 32; } diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/Scope.java index ce12830d0be..531049fc509 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/Scope.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/Scope.java @@ -108,6 +108,7 @@ public char[] readableName() { public final static int COMPATIBLE = 0; public final static int AUTOBOX_COMPATIBLE = 1; public final static int VARARGS_COMPATIBLE = 2; + public final static int NEEDS_MISSING_TYPE = -2; /* Type Compatibilities */ public static final int EQUAL_OR_MORE_SPECIFIC = -1; @@ -871,13 +872,16 @@ protected final MethodBinding computeCompatibleMethod(MethodBinding method, Type } - if ((parameterCompatibilityLevel(method, arguments, tiebreakingVarargsMethods)) > NOT_COMPATIBLE) { + int level = parameterCompatibilityLevel(method, arguments, tiebreakingVarargsMethods); + if (level > NOT_COMPATIBLE) { if (method.hasPolymorphicSignature(this)) { // generate polymorphic method and set polymorphic tagbits as well method.tagBits |= TagBits.AnnotationPolymorphicSignature; return this.environment().createPolymorphicMethod(method, arguments, this); } return method; + } else if (level == NEEDS_MISSING_TYPE) { + return new ProblemMethodBinding(method, method.selector, method.parameters, ProblemReasons.MissingTypeInSignature); } // if method is generic and type arguments have been supplied, only then answer a problem // of ParameterizedMethodTypeMismatch, else a non-generic method was invoked using type arguments @@ -1764,6 +1768,8 @@ public MethodBinding findMethod0(ReferenceBinding receiverType, char[] selector, if (candidatesCount == 0) candidates = new MethodBinding[foundSize]; candidates[candidatesCount++] = compatibleMethod; + } else if (compatibleMethod.problemId() == ProblemReasons.MissingTypeInSignature) { + return compatibleMethod; // use this method for error message to give a hint about the missing type } else if (problemMethod == null) { problemMethod = compatibleMethod; } @@ -2495,6 +2501,8 @@ public MethodBinding getConstructor0(ReferenceBinding receiverType, TypeBinding[ if (compatibleMethod != null) { if (compatibleMethod.isValidBinding()) compatible[compatibleIndex++] = compatibleMethod; + else if (compatibleMethod.problemId() == ProblemReasons.MissingTypeInSignature) + return compatibleMethod; // use this method for error message to give a hint about the missing type else if (problemMethod == null) problemMethod = compatibleMethod; } @@ -4648,6 +4656,10 @@ protected final MethodBinding mostSpecificMethodBinding(MethodBinding[] visible, int compatibleCount = 0; for (int i = 0; i < visibleSize; i++) if ((compatibilityLevels[i] = parameterCompatibilityLevel(visible[i], argumentTypes, invocationSite)) != NOT_COMPATIBLE) { + if (compatibilityLevels[i] == NEEDS_MISSING_TYPE) { + // cannot conclusively select any candidate, use the method with missing types in the error message + return new ProblemMethodBinding(visible[i], visible[i].selector, visible[i].parameters, ProblemReasons.Ambiguous); + } if (i != compatibleCount) { visible[compatibleCount] = visible[i]; compatibilityLevels[compatibleCount] = compatibilityLevels[i]; @@ -5161,8 +5173,8 @@ public int parameterCompatibilityLevel(MethodBinding method, TypeBinding[] argum TypeBinding arg = (tiebreakingVarargsMethods && (i == (argLength - 1))) ? ((ArrayBinding)arguments[i]).elementsType() : arguments[i]; if (TypeBinding.notEquals(arg,param)) { int newLevel = parameterCompatibilityLevel(arg, param, env, tiebreakingVarargsMethods, method); - if (newLevel == NOT_COMPATIBLE) - return NOT_COMPATIBLE; + if (newLevel < COMPATIBLE) + return newLevel; if (newLevel > level) level = newLevel; } @@ -5193,6 +5205,8 @@ private int parameterCompatibilityLevel(TypeBinding arg, TypeBinding param, Look // only called if env.options.sourceLevel >= ClassFileConstants.JDK1_5 if (arg == null || param == null) return NOT_COMPATIBLE; + if ((param.tagBits & TagBits.HasMissingType) != 0) + return NEEDS_MISSING_TYPE; if (arg instanceof PolyTypeBinding && !((PolyTypeBinding) arg).expression.isPertinentToApplicability(param, method)) { if (arg.isPotentiallyCompatibleWith(param, this)) return COMPATIBLE; diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java index 84265a3f95c..063986d6e98 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java @@ -4164,6 +4164,10 @@ public void invalidConstructor(Statement statement, MethodBinding targetConstruc problemConstructor = (ProblemMethodBinding) targetConstructor; contradictoryNullAnnotationsInferred(problemConstructor.closestMatch, statement); return; + case ProblemReasons.MissingTypeInSignature: + problemConstructor = (ProblemMethodBinding) targetConstructor; + missingTypeInConstructor(statement, problemConstructor.closestMatch); + return; case ProblemReasons.NoError : // 0 default : needImplementation(statement); // want to fail to see why we were here... @@ -4785,6 +4789,10 @@ public void invalidMethod(MessageSend messageSend, MethodBinding method, Scope s problemMethod = (ProblemMethodBinding) method; contradictoryNullAnnotationsInferred(problemMethod.closestMatch, messageSend); return; + case ProblemReasons.MissingTypeInSignature: + problemMethod = (ProblemMethodBinding) method; + missingTypeInMethod(messageSend, problemMethod.closestMatch); + return; case ProblemReasons.NoError : // 0 default : needImplementation(messageSend); // want to fail to see why we were here... diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java index 5af1988a49f..2377fdbcf2c 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java @@ -497,15 +497,10 @@ public void test005() { "----------\n" + /* expected compiler log */ "1. ERROR in X.java (at line 4)\n" + " ofoo.bar();\n" + - " ^^^^^^^^^^\n" + - "The type q1.q2.Zork cannot be resolved. It is indirectly referenced from required type p.OtherFoo\n" + - "----------\n" + - "2. ERROR in X.java (at line 4)\n" + - " ofoo.bar();\n" + " ^^^\n" + "The method bar() from the type OtherFoo refers to the missing type Zork\n" + "----------\n" + - "3. ERROR in X.java (at line 5)\n" + + "2. ERROR in X.java (at line 5)\n" + " q1.q2.Zork z;\n" + " ^^^^^^^^^^\n" + "q1.q2.Zork cannot be resolved to a type\n" + @@ -564,15 +559,10 @@ public void test006() { "----------\n" + "2. ERROR in X.java (at line 5)\n" + " ofoo.bar();\n" + - " ^^^^^^^^^^\n" + - "The type q1.q2.Zork cannot be resolved. It is indirectly referenced from required type p.OtherFoo\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " ofoo.bar();\n" + " ^^^\n" + "The method bar() from the type OtherFoo refers to the missing type Zork\n" + "----------\n" + - "4. ERROR in X.java (at line 6)\n" + + "3. ERROR in X.java (at line 6)\n" + " Zork z;\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + @@ -631,15 +621,10 @@ public void test007() { "----------\n" + "2. ERROR in X.java (at line 5)\n" + " ofoo.bar();\n" + - " ^^^^^^^^^^\n" + - "The type q1.q2.Zork cannot be resolved. It is indirectly referenced from required type p.OtherFoo\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " ofoo.bar();\n" + " ^^^\n" + "The method bar() from the type OtherFoo refers to the missing type Zork\n" + "----------\n" + - "4. ERROR in X.java (at line 6)\n" + + "3. ERROR in X.java (at line 6)\n" + " Zork z;\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + @@ -8828,4 +8813,186 @@ public void testBug576735() { "----------\n"; runner.runNegativeTest(); } +public void testMissingClassNeededForOverloadResolution() { + Runner runner = new Runner(); + runner.testFiles = new String[] { + "p1/A.java", + """ + package p1; + public class A {} + """, + "p1/B.java", + """ + package p1; + public class B { + public void m(A a) {} + public void m(Object s) {} + public void m(Object s1, String s2) {} + public void other() {} + } + """ + }; + runner.runConformTest(); + + // delete binary file A (i.e. simulate removing it from classpath for subsequent compile) + Util.delete(new File(OUTPUT_DIR, "p1" + File.separator + "A.class")); + runner.shouldFlushOutputDirectory = false; + + runner.testFiles = new String[] { + "p2/C.java", + """ + package p2; + import p1.B; + public class C { + void test(B b) { + b.other(); // no need to see A for other() + b.m(this, ""); // overload selected by arity + } + } + """ + }; + runner.runConformTest(); + + runner.testFiles = new String[] { + "p2/D.java", + """ + package p2; + import p1.B; + public class D { + void test(B b) { + b.m(this); // cannot select without seeing class A + } + } + """ + }; + runner.expectedCompilerLog = """ + ---------- + 1. ERROR in p2\\D.java (at line 5) + b.m(this); // cannot select without seeing class A + ^ + The method m(A) from the type B refers to the missing type A + ---------- + """; + runner.runNegativeTest(); +} +public void testMissingClassNeededForOverloadResolution_varargs1() { + if (this.complianceLevel < ClassFileConstants.JDK1_5) return; // uses varargs + Runner runner = new Runner(); + runner.customOptions = getCompilerOptions(); + runner.testFiles = new String[] { + "p1/A.java", + """ + package p1; + public class A {} + """, + "p1/B.java", + """ + package p1; + public class B { + public void m(Object o1, String s, A... a) {} + public void m(Object o1) {} + public void n(Object o1, A... a) {} + public void n(Object o1) {} + } + """ + }; + runner.runConformTest(); + + // delete binary file A (i.e. simulate removing it from classpath for subsequent compile) + Util.delete(new File(OUTPUT_DIR, "p1" + File.separator + "A.class")); + runner.shouldFlushOutputDirectory = false; + + runner.customOptions.put(CompilerOptions.OPTION_ReportVarargsArgumentNeedCast, CompilerOptions.IGNORE); + runner.testFiles = new String[] { + "p2/C.java", + """ + package p2; + import p1.B; + public class C { + void test(B b) { + b.m(this, ""); // overload selected by arity, trailing A[] is irrelevant + b.m(this); // overload selected by arity, no reference to A + } + } + """ + }; + runner.runConformTest(); + + runner.testFiles = new String[] { + "p2/D.java", + """ + package p2; + import p1.B; + public class D { + void test(B b) { + b.n(this, null); // passing null into A[] is not OK + b.n(this, null, null); // passing null into A is not OK (could potentially be accepted) + b.n(this); // resolvable in strict mode, ignore the varargs method + } + } + """ + }; + runner.expectedCompilerLog = """ + ---------- + 1. ERROR in p2\\D.java (at line 5) + b.n(this, null); // passing null into A[] is not OK + ^ + The method n(Object, A...) from the type B refers to the missing type A + ---------- + 2. ERROR in p2\\D.java (at line 6) + b.n(this, null, null); // passing null into A is not OK (could potentially be accepted) + ^ + The method n(Object, A...) from the type B refers to the missing type A + ---------- + """; + runner.runNegativeTest(); +} +public void testMissingClassNeededForOverloadResolution_varargs2() { + if (this.complianceLevel < ClassFileConstants.JDK1_5) return; // uses varargs + Runner runner = new Runner(); + runner.testFiles = new String[] { + "p1/A.java", + """ + package p1; + public class A {} + """, + "p1/B.java", + """ + package p1; + public class B { + public void m(A a, String... args) {} + public void m(Object s, Number... args) {} + public void m(Object s1, String s2) {} + } + """ + }; + runner.runConformTest(); + + // delete binary file A (i.e. simulate removing it from classpath for subsequent compile) + Util.delete(new File(OUTPUT_DIR, "p1" + File.separator + "A.class")); + runner.shouldFlushOutputDirectory = false; + + runner.testFiles = new String[] { + "p2/C.java", + """ + package p2; + import p1.B; + public class C { + void test(B b) { + b.m(this, ""); // two overloads could apply (not knowing A) + b.m(this, 3); // overload effectively selected by 2nd arg + } + } + """ + }; + runner.expectedCompilerLog = """ + ---------- + 1. ERROR in p2\\C.java (at line 5) + b.m(this, ""); // two overloads could apply (not knowing A) + ^ + The method m(A, String...) from the type B refers to the missing type A + ---------- + """; + runner.runNegativeTest(); +} } diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java index dc26c3ecc47..0e054e5469e 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java @@ -2836,7 +2836,7 @@ public void testBug564638_041() { "2. ERROR in X.java (at line 5)\n" + " this(t);\n" + " ^^^^^^^^\n" + - "The parameterized constructor X(permits) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(permits) refers to the missing type permits\n" + "----------\n"); } @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -2863,7 +2863,7 @@ public void testBug564638_042() { "3. ERROR in X.java (at line 5)\n" + " this(t);\n" + " ^^^^^^^^\n" + - "The parameterized constructor X(permits) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(permits) refers to the missing type permits\n" + "----------\n", null, true, @@ -2887,7 +2887,7 @@ public void testBug564638_043() { "1. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + " ^^^^^^^^^^^^^^^^^\n" + - "The parameterized constructor X(permits) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(permits) refers to the missing type permits\n" + "----------\n" + "2. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + @@ -2915,7 +2915,7 @@ public void testBug564638_044() { "1. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + " ^^^^^^^^^^^^^^^^^\n" + - "The parameterized constructor X(permits) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(permits) refers to the missing type permits\n" + "----------\n" + "2. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + @@ -2949,7 +2949,7 @@ public void testBug564638_045() { "2. ERROR in X.java (at line 6)\n" + " x.foo(0);\n" + " ^^^\n" + - "The parameterized method foo(permits) of type X is not applicable for the arguments (Integer)\n" + + "The method foo(permits) from the type X refers to the missing type permits\n" + "----------\n"); } @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -2977,7 +2977,7 @@ public void testBug564638_046() { "3. ERROR in X.java (at line 6)\n" + " x.foo(0);\n" + " ^^^\n" + - "The parameterized method foo(permits) of type X is not applicable for the arguments (Integer)\n" + + "The method foo(permits) from the type X refers to the missing type permits\n" + "----------\n", null, true, @@ -4459,7 +4459,7 @@ public void testBug564638b_041() { "2. ERROR in X.java (at line 5)\n" + " this(t);\n" + " ^^^^^^^^\n" + - "The parameterized constructor X(sealed) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(sealed) refers to the missing type sealed\n" + "----------\n"); } @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -4486,7 +4486,7 @@ public void testBug564638b_042() { "3. ERROR in X.java (at line 5)\n" + " this(t);\n" + " ^^^^^^^^\n" + - "The parameterized constructor X(sealed) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(sealed) refers to the missing type sealed\n" + "----------\n", null, true, @@ -4510,7 +4510,7 @@ public void testBug564638b_043() { "1. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + " ^^^^^^^^^^^^^^^^\n" + - "The parameterized constructor X(sealed) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(sealed) refers to the missing type sealed\n" + "----------\n" + "2. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + @@ -4538,7 +4538,7 @@ public void testBug564638b_044() { "1. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + " ^^^^^^^^^^^^^^^^\n" + - "The parameterized constructor X(sealed) of type X is not applicable for the arguments (Integer)\n" + + "The constructor X(sealed) refers to the missing type sealed\n" + "----------\n" + "2. ERROR in X.java (at line 5)\n" + " new X(t).foo();\n" + @@ -4572,7 +4572,7 @@ public void testBug564638b_045() { "2. ERROR in X.java (at line 6)\n" + " x.foo(0);\n" + " ^^^\n" + - "The parameterized method foo(sealed) of type X is not applicable for the arguments (Integer)\n" + + "The method foo(sealed) from the type X refers to the missing type sealed\n" + "----------\n"); } @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -4600,7 +4600,7 @@ public void testBug564638b_046() { "3. ERROR in X.java (at line 6)\n" + " x.foo(0);\n" + " ^^^\n" + - "The parameterized method foo(sealed) of type X is not applicable for the arguments (Integer)\n" + + "The method foo(sealed) from the type X refers to the missing type sealed\n" + "----------\n", null, true,