From 2c5b0d8d506a842020babb6a44f1e5666daa2f70 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Fri, 26 Oct 2012 10:36:43 +0400 Subject: [PATCH] IDEA-93355 Incorrect 'inner class cannot have static declarations' --- .../jetbrains/plugins/groovy/annotator/GroovyAnnotator.java | 3 --- .../groovy/lang/highlighting/GroovyHighlightingTest.groovy | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java index 10ab4b4f282a..73bcd35029c0 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java @@ -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); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GroovyHighlightingTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GroovyHighlightingTest.groovy index 93a3fc1801b9..cd5a81493c1e 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GroovyHighlightingTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GroovyHighlightingTest.groovy @@ -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();}