mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-113590 annotations as annotation values
This commit is contained in:
@@ -1430,6 +1430,7 @@ public class GroovyAnnotator extends GroovyElementVisitor {
|
||||
private boolean checkAnnotationAttributeValue(GrAnnotationMemberValue value, PsiElement toHighlight) {
|
||||
if (value instanceof GrLiteral) return false;
|
||||
if (value instanceof GrClosableBlock) return false;
|
||||
if (value instanceof GrAnnotation) return false;
|
||||
|
||||
if (value instanceof GrReferenceExpression) {
|
||||
PsiElement resolved = ((GrReferenceExpression)value).resolve();
|
||||
|
||||
+18
@@ -1600,4 +1600,22 @@ def groovy2 = '''print <error descr="String end expected">'abc\\\\' </error>'''
|
||||
|
||||
""")
|
||||
}
|
||||
|
||||
void testAnnotationAsAnnotationValue() {
|
||||
testHighlighting('''\
|
||||
@interface A {}
|
||||
@interface B {
|
||||
A[] foo()
|
||||
}
|
||||
@interface C {
|
||||
A foo()
|
||||
}
|
||||
|
||||
@B(foo = @A)
|
||||
@B(foo = [@A])
|
||||
@C(foo = @A)
|
||||
@C(foo = <error descr="Cannot assign 'Integer' to 'A'">2</error>)
|
||||
def foo
|
||||
''')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user