diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java index 2b873a777d2..1dc22d5a4e9 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java @@ -376,7 +376,7 @@ public class JetParsing extends AbstractJetParsing { } if (declType == null) { - errorAndAdvance("Expecting package directive or top level declaration"); + errorAndAdvance("Expecting a top level declaration"); decl.drop(); } else { diff --git a/compiler/testData/psi/FileStart_ERR.txt b/compiler/testData/psi/FileStart_ERR.txt index a18a75db412..64eee41a3f6 100644 --- a/compiler/testData/psi/FileStart_ERR.txt +++ b/compiler/testData/psi/FileStart_ERR.txt @@ -1,9 +1,9 @@ JetFile: FileStart_ERR.kt PACKAGE_DIRECTIVE - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DIV)('/') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(package)('package') PsiWhiteSpace(' ') MODIFIER_LIST @@ -31,5 +31,5 @@ JetFile: FileStart_ERR.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration \ No newline at end of file diff --git a/compiler/testData/psi/Functions_ERR.txt b/compiler/testData/psi/Functions_ERR.txt index 3cde0a8adaa..64cf63775f7 100644 --- a/compiler/testData/psi/Functions_ERR.txt +++ b/compiler/testData/psi/Functions_ERR.txt @@ -7,7 +7,7 @@ JetFile: Functions_ERR.kt PsiElement(IDENTIFIER)('foo') PsiErrorElement:Expecting '(' - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace('\n') FUN diff --git a/compiler/testData/psi/PackageBlockFirst.txt b/compiler/testData/psi/PackageBlockFirst.txt index 6d74cfd413a..105026cdd32 100644 --- a/compiler/testData/psi/PackageBlockFirst.txt +++ b/compiler/testData/psi/PackageBlockFirst.txt @@ -5,7 +5,7 @@ JetFile: PackageBlockFirst.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foobar') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') PROPERTY @@ -32,5 +32,5 @@ JetFile: PackageBlockFirst.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace('\n') - PsiErrorElement:Expecting package directive or top level declaration - PsiElement(RBRACE)('}') + PsiErrorElement:Expecting a top level declaration + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/Properties_ERR.txt b/compiler/testData/psi/Properties_ERR.txt index eaa89dc4aef..d8c7c40f52c 100644 --- a/compiler/testData/psi/Properties_ERR.txt +++ b/compiler/testData/psi/Properties_ERR.txt @@ -119,22 +119,22 @@ JetFile: Properties_ERR.kt MODIFIER_LIST PsiElement(public)('public') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(EQ)('=') PsiWhiteSpace(' ') PROPERTY @@ -176,4 +176,4 @@ JetFile: Properties_ERR.kt PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiErrorElement:Expecting function body - PsiElement(MINUS)('-') + PsiElement(MINUS)('-') \ No newline at end of file diff --git a/compiler/testData/psi/RootPackage.txt b/compiler/testData/psi/RootPackage.txt index 11cb2e7075d..7014983f5bf 100644 --- a/compiler/testData/psi/RootPackage.txt +++ b/compiler/testData/psi/RootPackage.txt @@ -15,7 +15,7 @@ JetFile: RootPackage.kt PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('X') PsiWhiteSpace('\n\n') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(package)('package') PsiWhiteSpace(' ') MODIFIER_LIST @@ -30,7 +30,7 @@ JetFile: RootPackage.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('bar') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') FUN @@ -127,5 +127,5 @@ JetFile: RootPackage.kt PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.txt b/compiler/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.txt index 247348b0c54..ddc59c7ef4b 100644 --- a/compiler/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.txt +++ b/compiler/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.txt @@ -11,7 +11,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt TYPE_REFERENCE PsiErrorElement:Type expected - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION_ENTRY @@ -47,21 +47,21 @@ JetFile: FunctionTypesWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -74,11 +74,11 @@ JetFile: FunctionTypesWithFunctionReceivers.kt TYPE_REFERENCE PsiErrorElement:Type expected - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -87,39 +87,39 @@ JetFile: FunctionTypesWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('S') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -132,9 +132,9 @@ JetFile: FunctionTypesWithFunctionReceivers.kt TYPE_REFERENCE PsiErrorElement:Type expected - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION_ENTRY @@ -143,37 +143,37 @@ JetFile: FunctionTypesWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -186,9 +186,9 @@ JetFile: FunctionTypesWithFunctionReceivers.kt TYPE_REFERENCE PsiErrorElement:Type expected - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION_ENTRY @@ -201,37 +201,37 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -244,9 +244,9 @@ JetFile: FunctionTypesWithFunctionReceivers.kt TYPE_REFERENCE PsiErrorElement:Type expected - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION_ENTRY @@ -282,37 +282,37 @@ JetFile: FunctionTypesWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -325,11 +325,11 @@ JetFile: FunctionTypesWithFunctionReceivers.kt TYPE_REFERENCE PsiErrorElement:Type expected - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -338,39 +338,39 @@ JetFile: FunctionTypesWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('S') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') TYPEDEF @@ -393,7 +393,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiErrorElement:Type expected PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION @@ -406,9 +406,9 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -417,39 +417,39 @@ JetFile: FunctionTypesWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('S') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -472,7 +472,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiErrorElement:Type expected PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION @@ -485,7 +485,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION_ENTRY @@ -494,37 +494,37 @@ JetFile: FunctionTypesWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -547,7 +547,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiErrorElement:Type expected PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION @@ -560,7 +560,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION_ENTRY @@ -573,37 +573,37 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -626,7 +626,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiErrorElement:Type expected PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION @@ -639,7 +639,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION_ENTRY @@ -675,37 +675,37 @@ JetFile: FunctionTypesWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') TYPEDEF @@ -728,7 +728,7 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiErrorElement:Type expected PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') MODIFIER_LIST ANNOTATION @@ -741,9 +741,9 @@ JetFile: FunctionTypesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -752,37 +752,37 @@ JetFile: FunctionTypesWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('S') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.txt b/compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.txt index 6168ad7aff7..242dd9f3e3c 100644 --- a/compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.txt +++ b/compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.txt @@ -20,7 +20,7 @@ JetFile: FunctionsWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') MODIFIER_LIST @@ -38,9 +38,9 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -57,19 +57,19 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('B') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') FUN MODIFIER_LIST @@ -101,7 +101,7 @@ JetFile: FunctionsWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') MODIFIER_LIST @@ -119,9 +119,9 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -138,19 +138,19 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('B') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') MODIFIER_LIST ANNOTATION_ENTRY @@ -162,7 +162,7 @@ JetFile: FunctionsWithFunctionReceivers.kt VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(SEMICOLON)(';') PsiWhiteSpace('\n') FUN @@ -184,7 +184,7 @@ JetFile: FunctionsWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') MODIFIER_LIST @@ -202,9 +202,9 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -221,19 +221,19 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('B') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') MODIFIER_LIST ANNOTATION_ENTRY @@ -246,9 +246,9 @@ JetFile: FunctionsWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') FUN @@ -280,7 +280,7 @@ JetFile: FunctionsWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') MODIFIER_LIST @@ -298,9 +298,9 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -317,19 +317,19 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('B') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') MODIFIER_LIST ANNOTATION_ENTRY @@ -342,9 +342,9 @@ JetFile: FunctionsWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') FUN @@ -387,9 +387,9 @@ JetFile: FunctionsWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Unit') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') FUN MODIFIER_LIST @@ -422,7 +422,7 @@ JetFile: FunctionsWithFunctionReceivers.kt PsiErrorElement:Parameters must have type annotation PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') MODIFIER_LIST ANNOTATION_ENTRY @@ -435,7 +435,7 @@ JetFile: FunctionsWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') MODIFIER_LIST @@ -446,9 +446,9 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Unit') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n\n') PsiComment(EOL_COMMENT)('// Recovery') @@ -473,7 +473,7 @@ JetFile: FunctionsWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') MODIFIER_LIST @@ -491,9 +491,9 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') MODIFIER_LIST ANNOTATION_ENTRY @@ -510,21 +510,21 @@ JetFile: FunctionsWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('B') PsiElement(GT)('>') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(DOT)('.') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(MINUS)('-') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LPAR)('(') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') \ No newline at end of file diff --git a/compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.txt b/compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.txt index f82888cc5bc..528ad74fbad 100644 --- a/compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.txt +++ b/compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.txt @@ -81,9 +81,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') MODIFIER_LIST @@ -100,9 +100,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('it') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') PROPERTY @@ -143,7 +143,7 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') MODIFIER_LIST @@ -154,9 +154,9 @@ JetFile: PropertiesWithFunctionReceivers.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Foo') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') MODIFIER_LIST @@ -173,9 +173,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('it') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n\n') PROPERTY @@ -232,9 +232,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') MODIFIER_LIST @@ -262,9 +262,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n\n') PROPERTY @@ -323,9 +323,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n\n') PROPERTY @@ -382,9 +382,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') PsiComment(EOL_COMMENT)('// Error recovery:') @@ -423,12 +423,12 @@ JetFile: PropertiesWithFunctionReceivers.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('set') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') MODIFIER_LIST @@ -442,9 +442,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') PROPERTY @@ -488,9 +488,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(IDENTIFIER)('foo') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') MODIFIER_LIST @@ -504,9 +504,9 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') MODIFIER_LIST @@ -520,7 +520,7 @@ JetFile: PropertiesWithFunctionReceivers.kt PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/greatSyntacticShift/functionTypes.txt b/compiler/testData/psi/greatSyntacticShift/functionTypes.txt index d1d35aeeb5b..15c810be84b 100644 --- a/compiler/testData/psi/greatSyntacticShift/functionTypes.txt +++ b/compiler/testData/psi/greatSyntacticShift/functionTypes.txt @@ -11,7 +11,7 @@ JetFile: functionTypes.kt PsiWhiteSpace('\n') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(package)('package') PsiWhiteSpace(' ') MODIFIER_LIST @@ -22,7 +22,7 @@ JetFile: functionTypes.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('n') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') CLASS @@ -30,7 +30,7 @@ JetFile: functionTypes.kt PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('B') PsiWhiteSpace('\n') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') PsiWhiteSpace('\n') CLASS diff --git a/compiler/testData/psi/platformTypesRecovery/WrongWordInParentheses.txt b/compiler/testData/psi/platformTypesRecovery/WrongWordInParentheses.txt index 431c4ee0e9f..7e9f14e7f5b 100644 --- a/compiler/testData/psi/platformTypesRecovery/WrongWordInParentheses.txt +++ b/compiler/testData/psi/platformTypesRecovery/WrongWordInParentheses.txt @@ -66,10 +66,10 @@ JetFile: WrongWordInParentheses.kt PsiErrorElement:Expecting ')' PsiElement(EXCL)('!') PsiWhiteSpace('\n') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(LBRACE)('{') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/propertyDelegate/DelegateAndInitializer.txt b/compiler/testData/psi/propertyDelegate/DelegateAndInitializer.txt index cb346cf9da1..a4ebd1a506d 100644 --- a/compiler/testData/psi/propertyDelegate/DelegateAndInitializer.txt +++ b/compiler/testData/psi/propertyDelegate/DelegateAndInitializer.txt @@ -77,8 +77,8 @@ JetFile: DelegateAndInitializer.kt PsiElement(RPAR)(')') PsiElement(SEMICOLON)(';') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(EQ)('=') PsiWhiteSpace(' ') - PsiErrorElement:Expecting package directive or top level declaration + PsiErrorElement:Expecting a top level declaration PsiElement(INTEGER_LITERAL)('3') \ No newline at end of file