FIR2IR: Fix smart-cast approximation implicit receiver

Previously, it was always cast to the first type of smart cast variants list
independently of callee symbol that might be present in the member scope
of a different type
This commit is contained in:
Denis.Zharkov
2021-01-26 10:28:07 +03:00
parent d9f45fdf9e
commit b1b89e6f5f
11 changed files with 64 additions and 5 deletions
@@ -28666,6 +28666,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("complexImplicitReceiver.kt")
public void testComplexImplicitReceiver() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/complexImplicitReceiver.kt");
}
@TestMetadata("falseSmartCast.kt")
public void testFalseSmartCast() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt");