diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxInlineCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxInlineCodegenTestGenerated.java index 130dac61a3a..2e5fc9358b8 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxInlineCodegenTestGenerated.java @@ -2912,6 +2912,11 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); diff --git a/compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt b/compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt new file mode 100644 index 00000000000..a25932d9c79 --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt @@ -0,0 +1,20 @@ +// IGNORE_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD, JVM_MULTI_MODULE_OLD_AGAINST_IR +// FILE: 1.kt +package test + +interface A +class B : A + +inline fun foo(a: Any) = (a as? T != null).toString()[0] + +// FILE: 2.kt + +import test.* + +fun box(): String { + val s = "" + foo(Any()) + foo(object : A {}) + foo(B()) + if (s != "ftt") return "fail: $s" + return "OK" +} + diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 1ba209a8d0e..856307067b1 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -2912,6 +2912,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 61117538669..d4710ea473e 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2912,6 +2912,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index a1edd93d1b4..e5bbcf46719 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -2912,6 +2912,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 800f36864d0..6b2ff92ca35 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2912,6 +2912,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxInlineTestGenerated.java index 4a00fb01f8d..9aa07e46432 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -2912,6 +2912,11 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxInlineTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxInlineTestGenerated.java index d614ac3a800..62f975aaa34 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxInlineTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxInlineTestGenerated.java @@ -2912,6 +2912,11 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java index 5e752c0e642..0ba350578c9 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java @@ -2657,6 +2657,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java index e353687b6b6..a666b0d1837 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java @@ -2657,6 +2657,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java index e88dede90cc..957cac619b7 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java @@ -2657,6 +2657,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @TestMetadata("dontSubstituteNonReified.kt") + public void testDontSubstituteNonReified() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); + } + @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt");