mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-166860 Method with generics and annotation incorrectly parsed
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ public class Annotation {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceElement.parse(builder, false, true, true, false, false) == ReferenceElement.ReferenceElementResult.FAIL) {
|
||||
if (ReferenceElement.parse(builder, false, false, true, false, false) == ReferenceElement.ReferenceElementResult.FAIL) {
|
||||
builder.error("Annotation name expected");
|
||||
annMarker.drop();
|
||||
return false;
|
||||
|
||||
+2
@@ -48,4 +48,6 @@ class AnnotationsParsingTest extends GroovyParsingTestCase {
|
||||
void testKeywordsAttributes() { doTest() }
|
||||
|
||||
void testMess() { doTest() }
|
||||
|
||||
void testTypeParameters() { doTest() }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
@Deprecated <T> T bar(T a) {}
|
||||
-----
|
||||
Groovy script
|
||||
Method
|
||||
Modifiers
|
||||
Annotation
|
||||
PsiElement(@)('@')
|
||||
Reference element
|
||||
PsiElement(identifier)('Deprecated')
|
||||
Annotation arguments
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
Type parameter list
|
||||
PsiElement(<)('<')
|
||||
Type parameter
|
||||
PsiElement(identifier)('T')
|
||||
Type extends bounds list
|
||||
<empty list>
|
||||
PsiElement(>)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
Type element
|
||||
Reference element
|
||||
PsiElement(identifier)('T')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(identifier)('bar')
|
||||
PsiElement(()('(')
|
||||
Parameter list
|
||||
Parameter
|
||||
Modifiers
|
||||
<empty list>
|
||||
Type element
|
||||
Reference element
|
||||
PsiElement(identifier)('T')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(identifier)('a')
|
||||
PsiElement())(')')
|
||||
Throw clause
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
Open block
|
||||
PsiElement({)('{')
|
||||
PsiElement(})('}')
|
||||
Reference in New Issue
Block a user