Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.6
-
None
Description
@CompileStatic class AnnotationCollectorChecker { boolean checkApplicability(PsiElement annotation) { final PsiElement parent = annotation.parent if (parent instanceof GrModifierList) { final collector = parent.rawAnnotations //compile error 'Access to com.intellij.psi.PsiElement#rawAnnotations' if (collector != null) { return true } } return false } }
I created a class in IntelliJ IDEA project and Groovy fails to compile it though GrModifierList has a 'getRawAnnotations()' method.
If I replace 'rawAnnotations' with 'getRawAnnotations()' Groovyc doesn't report errors.
PsiElement source https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/psi/PsiElement.java
GrModifierList source https://github.com/JetBrains/intellij-community/blob/master/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/api/auxiliary/modifiers/GrModifierList.java
I'm sorry but I didn't manage to reproduce the issue on simple project