mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix broken highlighting for duplicate methods
This commit is contained in:
@@ -346,7 +346,7 @@ public class GroovyAnnotator extends GroovyElementVisitor implements Annotator {
|
||||
checkTypeDefinition(myHolder, typeDefinition);
|
||||
checkTypeDefinitionModifiers(myHolder, typeDefinition);
|
||||
|
||||
checkDuplicateMethod(typeDefinition.getGroovyMethods(), myHolder);
|
||||
checkDuplicateMethod(typeDefinition.getMethods(), myHolder);
|
||||
checkImplementedMethodsOfClass(myHolder, typeDefinition);
|
||||
checkConstructors(myHolder, typeDefinition);
|
||||
highligtClassReference(myHolder, typeDefinition.getNameIdentifierGroovy());
|
||||
|
||||
@@ -564,4 +564,14 @@ class A {
|
||||
myFixture.addClass("package junit.framework; public class TestCase {}")
|
||||
doTest(new JUnitTestClassNamingConventionInspection(), new JUnitAbstractTestClassNamingConventionInspection())
|
||||
}
|
||||
|
||||
void testDuplicateMethods() {
|
||||
myFixture.configureByText('a.groovy', '''\
|
||||
class A {
|
||||
<error descr="Method with signature foo() is already defined in the class 'A'">def foo()</error>{}
|
||||
<error descr="Method with signature foo() is already defined in the class 'A'">def foo(def a=null)</error>{}
|
||||
}
|
||||
''')
|
||||
myFixture.checkHighlighting(true, false, false)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user