[FIR] Store fir for invalid when branches

^KTIJ-25646 fixed

Merge-request: KT-MR-10646
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
Egor Kulikov
2023-06-20 16:11:31 +00:00
committed by Space Team
parent 37876313c9
commit b147b7e929
32 changed files with 258 additions and 58 deletions
@@ -2023,6 +2023,12 @@ public class Fe10IdeNormalAnalysisSourceModuleReferenceResolveTestGenerated exte
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassNameBeforeDot.kt");
}
@Test
@TestMetadata("ClassReferenceInIncorrectWhenClause.kt")
public void testClassReferenceInIncorrectWhenClause() throws Exception {
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassReferenceInIncorrectWhenClause.kt");
}
@Test
@TestMetadata("ClassWithMultipleSuperTypeCalls.kt")
public void testClassWithMultipleSuperTypeCalls() throws Exception {
@@ -2023,6 +2023,12 @@ public class FirIdeDependentAnalysisSourceModuleReferenceResolveTestGenerated ex
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassNameBeforeDot.kt");
}
@Test
@TestMetadata("ClassReferenceInIncorrectWhenClause.kt")
public void testClassReferenceInIncorrectWhenClause() throws Exception {
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassReferenceInIncorrectWhenClause.kt");
}
@Test
@TestMetadata("ClassWithMultipleSuperTypeCalls.kt")
public void testClassWithMultipleSuperTypeCalls() throws Exception {
@@ -2023,6 +2023,12 @@ public class FirIdeNormalAnalysisSourceModuleReferenceResolveTestGenerated exten
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassNameBeforeDot.kt");
}
@Test
@TestMetadata("ClassReferenceInIncorrectWhenClause.kt")
public void testClassReferenceInIncorrectWhenClause() throws Exception {
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassReferenceInIncorrectWhenClause.kt");
}
@Test
@TestMetadata("ClassWithMultipleSuperTypeCalls.kt")
public void testClassWithMultipleSuperTypeCalls() throws Exception {
@@ -2023,6 +2023,12 @@ public class FirStandaloneNormalAnalysisSourceModuleReferenceResolveTestGenerate
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassNameBeforeDot.kt");
}
@Test
@TestMetadata("ClassReferenceInIncorrectWhenClause.kt")
public void testClassReferenceInIncorrectWhenClause() throws Exception {
runTest("analysis/analysis-api/testData/referenceResolve/withErrors/ClassReferenceInIncorrectWhenClause.kt");
}
@Test
@TestMetadata("ClassWithMultipleSuperTypeCalls.kt")
public void testClassWithMultipleSuperTypeCalls() throws Exception {
@@ -0,0 +1,7 @@
class SomeClass() {}
fun someFun() {
when {
is <caret>SomeClass
}
}
@@ -0,0 +1,2 @@
Resolved to:
0: (in ROOT) class SomeClass
@@ -491,6 +491,12 @@ public class FirOutOfContentRootLazyBodiesCalculatorTestGenerated extends Abstra
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt");
}
@Test
@TestMetadata("invalidWhen.kt")
public void testInvalidWhen() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/invalidWhen.kt");
}
@Test
@TestMetadata("labelForInfix.kt")
public void testLabelForInfix() throws Exception {
@@ -491,6 +491,12 @@ public class FirSourceLazyBodiesCalculatorTestGenerated extends AbstractFirSourc
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt");
}
@Test
@TestMetadata("invalidWhen.kt")
public void testInvalidWhen() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/invalidWhen.kt");
}
@Test
@TestMetadata("labelForInfix.kt")
public void testLabelForInfix() throws Exception {
@@ -7312,6 +7312,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/controlStructures/whenToAnyDiscriminatingUsages.kt");
}
@Test
@TestMetadata("whenWithNoSubjectAndCommas.kt")
public void testWhenWithNoSubjectAndCommas() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/whenWithNoSubjectAndCommas.kt");
}
@Test
@TestMetadata("whenWithNothingTypedSubject.kt")
public void testWhenWithNothingTypedSubject() throws Exception {
@@ -7312,6 +7312,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/controlStructures/whenToAnyDiscriminatingUsages.kt");
}
@Test
@TestMetadata("whenWithNoSubjectAndCommas.kt")
public void testWhenWithNoSubjectAndCommas() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/whenWithNoSubjectAndCommas.kt");
}
@Test
@TestMetadata("whenWithNothingTypedSubject.kt")
public void testWhenWithNothingTypedSubject() throws Exception {