Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index 89ac33a572..63a19489a3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -89,7 +89,16 @@ public void analyseCode(ClassScope classScope, InitializationFlowContext initial
if (isRecursive(null /*lazy initialized visited list*/)) {
this.scope.problemReporter().recursiveConstructorInvocation(this.constructorCall);
}
-
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=385780
+ if (this.typeParameters != null &&
+ !this.scope.referenceCompilationUnit().compilationResult.hasSyntaxError) {
+ for (int i = 0, length = this.typeParameters.length; i < length; ++i) {
+ TypeParameter typeParameter = this.typeParameters[i];
+ if ((typeParameter.binding.modifiers & ExtraCompilerModifiers.AccLocallyUsed) == 0) {
+ this.scope.problemReporter().unusedTypeParameter(typeParameter);
+ }
+ }
+ }
try {
ExceptionHandlingFlowContext constructorContext =
new ExceptionHandlingFlowContext(

Back to the top