mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
[java-highlighting] IDEA-264182 Do not report 'Annotations are not allowed here' in unterminated parameter list
GitOrigin-RevId: 6c6aff57643ec10b1ba2c44b52e6db352d43513a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
99c6375d04
commit
7a0831408f
@@ -335,7 +335,9 @@ public final class AnnotationsHighlightUtil {
|
||||
psiElement().withParent(PsiNameValuePair.class),
|
||||
psiElement().withParents(PsiArrayInitializerMemberValue.class, PsiNameValuePair.class),
|
||||
psiElement().withParents(PsiArrayInitializerMemberValue.class, PsiAnnotationMethod.class),
|
||||
psiElement().withParent(PsiAnnotationMethod.class).afterLeaf(PsiKeyword.DEFAULT)
|
||||
psiElement().withParent(PsiAnnotationMethod.class).afterLeaf(PsiKeyword.DEFAULT),
|
||||
// Unterminated parameter list like "void test(@NotNull String)": error on annotation looks annoying here
|
||||
psiElement().withParents(PsiModifierList.class, PsiParameterList.class)
|
||||
);
|
||||
|
||||
public static HighlightInfo checkApplicability(@NotNull PsiAnnotation annotation, @NotNull LanguageLevel level, @NotNull PsiFile file) {
|
||||
|
||||
@@ -13,6 +13,9 @@ abstract class C {
|
||||
|
||||
@Anno(nested = {@Anno, @Anno})
|
||||
void notWrong() { }
|
||||
|
||||
void test(@Anno String<error descr="Identifier expected">)</error> {
|
||||
}
|
||||
}
|
||||
|
||||
class B extends <error descr="Type annotations are not supported at language level '7'">@Deprecated</error> Object { }
|
||||
|
||||
Reference in New Issue
Block a user