Fix IAE for wrong use-site @file annotation

#EA-100189 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-07-27 18:22:09 +03:00
parent 4d4c39939f
commit 8f8143d3ed
18 changed files with 208 additions and 27 deletions
@@ -11,9 +11,9 @@ KtFile: fileAnnotationInWrongPlace.kt
MODIFIER_LIST
ANNOTATION_ENTRY
PsiElement(AT)('@')
PsiErrorElement:@file annotations are only allowed before package declaration
ANNOTATION_TARGET
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
@@ -28,9 +28,9 @@ KtFile: fileAnnotationInWrongPlace.kt
MODIFIER_LIST
ANNOTATION
PsiElement(AT)('@')
PsiErrorElement:@file annotations are only allowed before package declaration
ANNOTATION_TARGET
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
@@ -62,9 +62,9 @@ KtFile: fileAnnotationInWrongPlace.kt
MODIFIER_LIST
ANNOTATION
PsiElement(AT)('@')
PsiErrorElement:@file annotations are only allowed before package declaration
ANNOTATION_TARGET
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
@@ -93,9 +93,9 @@ KtFile: fileAnnotationInWrongPlace.kt
MODIFIER_LIST
ANNOTATION
PsiElement(AT)('@')
PsiErrorElement:@file annotations are only allowed before package declaration
ANNOTATION_TARGET
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
PsiElement(LBRACKET)('[')
PsiErrorElement:Expecting a list of annotations
<empty list>
@@ -35,9 +35,9 @@ KtFile: withoutPackage.kt
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(AT)('@')
PsiErrorElement:@file annotations are only allowed before package declaration
ANNOTATION_TARGET
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
@@ -35,9 +35,9 @@ KtFile: withoutPackageWithSimpleAnnotation.kt
PsiWhiteSpace('\n')
ANNOTATION_ENTRY
PsiElement(AT)('@')
PsiErrorElement:@file annotations are only allowed before package declaration
ANNOTATION_TARGET
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE