Add test for obsolete recovery case (semi-finished extension)

^KT-7405 Obsolete
This commit is contained in:
Denis Zharkov
2019-01-09 15:00:22 +03:00
parent 65e6e21d0f
commit db53c4bea4
3 changed files with 37 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
fun Any.
fun goodFunction() {
}
+28
View File
@@ -0,0 +1,28 @@
KtFile: UnfinishedExtension.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Any')
PsiElement(DOT)('.')
PsiErrorElement:Expecting function name
<empty list>
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)('}')
@@ -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");