mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-93355 Incorrect 'inner class cannot have static declarations'
This commit is contained in:
@@ -1548,9 +1548,6 @@ public class GroovyAnnotator extends GroovyElementVisitor implements Annotator {
|
||||
checkModifierIsNotAllowed(modifiersList, PROTECTED, GroovyBundle.message("interface.members.are.not.allowed.to.be", PROTECTED), holder);
|
||||
}
|
||||
else if (containingTypeDef.isAnonymous()) {
|
||||
//anonymous class
|
||||
checkModifierIsNotAllowed(modifiersList, STATIC, GroovyBundle.message("static.declaration.in.inner.class"), holder);
|
||||
|
||||
if (isMethodAbstract) {
|
||||
final Annotation annotation = holder.createErrorAnnotation(getModifierOrList(modifiersList, ABSTRACT), GroovyBundle.message("anonymous.class.cannot.have.abstract.method"));
|
||||
registerMakeAbstractMethodNotAbstractFix(annotation, method, false);
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class GroovyHighlightingTest extends GrHighlightingTestBase {
|
||||
|
||||
public void testAnonymousClassConstructor() {doTest();}
|
||||
public void testAnonymousClassAbstractMethod() {doTest();}
|
||||
public void testAnonymousClassStaticMethod() {doTest();}
|
||||
public void _testAnonymousClassStaticMethod() {doTest();}
|
||||
public void testAnonymousClassShoudImplementMethods() {doTest();}
|
||||
public void testAnonymousClassShouldImplementSubstitutedMethod() {doTest();}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user