diff --git a/compiler/testData/psi/recovery/BrokenFunctionSuperType.kt b/compiler/testData/psi/recovery/BrokenFunctionSuperType.kt new file mode 100644 index 00000000000..74abc24d400 --- /dev/null +++ b/compiler/testData/psi/recovery/BrokenFunctionSuperType.kt @@ -0,0 +1,2 @@ +class A : (categoryName: ) { +} \ No newline at end of file diff --git a/compiler/testData/psi/recovery/BrokenFunctionSuperType.txt b/compiler/testData/psi/recovery/BrokenFunctionSuperType.txt new file mode 100644 index 00000000000..10ed2aef346 --- /dev/null +++ b/compiler/testData/psi/recovery/BrokenFunctionSuperType.txt @@ -0,0 +1,34 @@ +JetFile: BrokenFunctionSuperType.kt + PACKAGE_DIRECTIVE + + CLASS + PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('A') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + FUNCTION_TYPE + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('categoryName') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + PsiErrorElement:Type expected + + PsiElement(RPAR)(')') + PsiErrorElement:Expecting '->' to specify return type of a function type + + PsiWhiteSpace(' ') + TYPE_REFERENCE + PsiErrorElement:Type expected + + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java index 936e3901fd9..551f31cd816 100644 --- a/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java @@ -1620,6 +1620,12 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest { doParsingTest(fileName); } + @TestMetadata("BrokenFunctionSuperType.kt") + public void testBrokenFunctionSuperType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/recovery/BrokenFunctionSuperType.kt"); + doParsingTest(fileName); + } + @TestMetadata("CatchKeywordRBrace.kt") public void testCatchKeywordRBrace() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/recovery/CatchKeywordRBrace.kt");