diff --git a/compiler/testData/psi/recovery/UnfinishedExtension.kt b/compiler/testData/psi/recovery/UnfinishedExtension.kt new file mode 100644 index 00000000000..c7852538854 --- /dev/null +++ b/compiler/testData/psi/recovery/UnfinishedExtension.kt @@ -0,0 +1,4 @@ +fun Any. + +fun goodFunction() { +} diff --git a/compiler/testData/psi/recovery/UnfinishedExtension.txt b/compiler/testData/psi/recovery/UnfinishedExtension.txt new file mode 100644 index 00000000000..1aec4227961 --- /dev/null +++ b/compiler/testData/psi/recovery/UnfinishedExtension.txt @@ -0,0 +1,28 @@ +KtFile: UnfinishedExtension.kt + PACKAGE_DIRECTIVE + + IMPORT_LIST + + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Any') + PsiElement(DOT)('.') + PsiErrorElement:Expecting function name + + PsiWhiteSpace('\n\n') + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('goodFunction') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java index 810af25a327..0d1314fdeec 100644 --- a/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java @@ -2173,6 +2173,11 @@ public class ParsingTestGenerated extends AbstractParsingTest { runTest("compiler/testData/psi/recovery/SameLineStatementRecovery.kt"); } + @TestMetadata("UnfinishedExtension.kt") + public void testUnfinishedExtension() throws Exception { + runTest("compiler/testData/psi/recovery/UnfinishedExtension.kt"); + } + @TestMetadata("ValNoName.kt") public void testValNoName() throws Exception { runTest("compiler/testData/psi/recovery/ValNoName.kt");