diff --git a/compiler/testData/codegen/boxInline/smap/classCycle.kt b/compiler/testData/codegen/boxInline/smap/classCycle.kt new file mode 100644 index 00000000000..e0af8c1e80c --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/classCycle.kt @@ -0,0 +1,98 @@ +// FILE: 1.kt +package test + +class A { + inline fun a() = B().b() + inline fun c() = B().d() +} + +class B { + inline fun b() = A().c() + inline fun d() = "OK" +} + +// FILE: 2.kt +import test.* + +fun box() = A().a() + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/B ++ 2 1.kt +test/A +*L +1#1,14:1 +11#1:16 +6#2:15 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/B +*L +10#1:16 +10#1:15 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/A ++ 2 1.kt +test/B +*L +1#1,14:1 +6#1:16 +10#2:15 +11#2:17 +11#2:18 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/A +*L +5#1:16 +5#1:15 +5#1:17 +6#1:18 +*E + +// FILE: 2.smap +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/A ++ 3 1.kt +test/B +*L +1#1,6:1 +5#2:7 +6#2:9 +10#3:8 +11#3:10 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +4#1:7 +4#1:9 +4#1:8 +4#1:10 +*E diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 137df5bfcaf..2c952fa4ee0 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -3265,6 +3265,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @TestMetadata("classCycle.kt") + public void testClassCycle() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); + } + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 6ba3b2923d0..90b1ddb3e3a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3265,6 +3265,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @TestMetadata("classCycle.kt") + public void testClassCycle() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); + } + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index 968c653a00b..569b6c76bfd 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -3265,6 +3265,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @TestMetadata("classCycle.kt") + public void testClassCycle() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); + } + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 14fbea4485d..e8427875132 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3265,6 +3265,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @TestMetadata("classCycle.kt") + public void testClassCycle() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); + } + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.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 884daf426e1..50ec07abb1a 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 @@ -2880,6 +2880,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @TestMetadata("classCycle.kt") + public void testClassCycle() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); + } + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.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 7953445f8b5..b33d7cbe1a9 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 @@ -2880,6 +2880,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @TestMetadata("classCycle.kt") + public void testClassCycle() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); + } + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");