FIR2IR: Fix complex cases of smart cast expressions used as dispatch receiver
It might be not only <ExpressionWithSmartCast>(a).foo(), but also id(<ExpressionWithSmartCast>(a)).foo() and many other cases
This commit is contained in:
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -24792,6 +24792,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complexExplicitReceiver.kt")
|
||||
public void testComplexExplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexExplicitReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexImplicitReceiver.kt")
|
||||
public void testComplexImplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexImplicitReceiver.kt");
|
||||
|
||||
Generated
+5
@@ -24792,6 +24792,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complexExplicitReceiver.kt")
|
||||
public void testComplexExplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexExplicitReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexImplicitReceiver.kt")
|
||||
public void testComplexImplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexImplicitReceiver.kt");
|
||||
|
||||
Generated
+5
@@ -24757,6 +24757,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complexExplicitReceiver.kt")
|
||||
public void testComplexExplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexExplicitReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexImplicitReceiver.kt")
|
||||
public void testComplexImplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexImplicitReceiver.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -13261,6 +13261,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complexExplicitReceiver.kt")
|
||||
public void testComplexExplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexExplicitReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexImplicitReceiver.kt")
|
||||
public void testComplexImplicitReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/smartCasts/complexImplicitReceiver.kt");
|
||||
|
||||
Reference in New Issue
Block a user