mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-94938 Invalid error reported on Type param
This commit is contained in:
@@ -336,7 +336,7 @@ public class GroovyAnnotator extends GroovyElementVisitor implements Annotator {
|
||||
}
|
||||
|
||||
private static void checkConstructors(AnnotationHolder holder, GrTypeDefinition typeDefinition) {
|
||||
if (typeDefinition.isEnum() || typeDefinition.isInterface() || typeDefinition.isAnonymous()) return;
|
||||
if (typeDefinition.isEnum() || typeDefinition.isInterface() || typeDefinition.isAnonymous() || typeDefinition instanceof GrTypeParameter) return;
|
||||
final PsiClass superClass = typeDefinition.getSuperClass();
|
||||
if (superClass == null) return;
|
||||
|
||||
|
||||
+18
@@ -927,4 +927,22 @@ class A {
|
||||
|
||||
assertNotNull(myFixture.findSingleIntention("Create Method 'abc'"))
|
||||
}
|
||||
|
||||
void testTypeParameterIsCorrect() {
|
||||
testHighlighting('''\
|
||||
class Component{}
|
||||
|
||||
class Window extends Component{
|
||||
Window(i) {
|
||||
}
|
||||
}
|
||||
|
||||
class Super <C extends Component> {
|
||||
|
||||
}
|
||||
|
||||
class Sub<W extends Window> extends Super<W> {
|
||||
}
|
||||
''')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user