FIR. Refactor smart-cast representation in FIR tree

Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
This commit is contained in:
Simon Ogorodnik
2022-08-02 00:49:24 +02:00
committed by teamcity
parent bc9db58b3c
commit 513af2dfbc
154 changed files with 9573 additions and 9320 deletions
@@ -832,6 +832,12 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated ext
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/variableWithMemberInvoke.kt");
}
@Test
@TestMetadata("whenSelectorSmartCast.kt")
public void testWhenSelectorSmartCast() throws Exception {
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/whenSelectorSmartCast.kt");
}
@Nested
@TestMetadata("analysis/analysis-api/testData/components/callResolver/resolveCall/assignments")
@TestDataPath("$PROJECT_ROOT")
@@ -46,6 +46,12 @@ public class FirStandaloneNormalAnalysisSourceModuleHLSmartCastInfoTestGenerated
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/smartCastProvider/smartCastInfo"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("bothImplicitReceiversSmartCast.kt")
public void testBothImplicitReceiversSmartCast() throws Exception {
runTest("analysis/analysis-api/testData/components/smartCastProvider/smartCastInfo/bothImplicitReceiversSmartCast.kt");
}
@Test
@TestMetadata("multiSmartcastAsReceiver_stable.kt")
public void testMultiSmartcastAsReceiver_stable() throws Exception {
@@ -460,6 +460,18 @@ public class FirStandaloneNormalAnalysisSourceModuleReferenceResolveTestGenerate
runTest("analysis/analysis-api/testData/referenceResolve/SeveralOverrides.kt");
}
@Test
@TestMetadata("smartCastExpression.kt")
public void testSmartCastExpression() throws Exception {
runTest("analysis/analysis-api/testData/referenceResolve/smartCastExpression.kt");
}
@Test
@TestMetadata("smartCastInvokeReceiver.kt")
public void testSmartCastInvokeReceiver() throws Exception {
runTest("analysis/analysis-api/testData/referenceResolve/smartCastInvokeReceiver.kt");
}
@Test
@TestMetadata("SuperTypePrimaryConstructor.kt")
public void testSuperTypePrimaryConstructor() throws Exception {