diff --git a/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt b/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt new file mode 100644 index 00000000000..c061ca1c431 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt @@ -0,0 +1,60 @@ +// FILE: 1.kt +package test + +inline fun f() {} + +// FILE: 2.kt +import test.* + +inline fun g() {} + +inline fun h() { + f() // line N+1 -> 1.kt:4 + g() // line N+2 -> 2.kt:4 + f() // line N+3 -> 1.kt:4 again +} + +fun box(): String { + h() + return "OK" +} + +// FILE: 1.smap + +// FILE: 2.smap +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,17:1 +4#1:19 +7#1:21 +8#1:23 +4#1,6:24 +10#1:31 +4#2:18 +4#2:20 +4#2:22 +4#2:30 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +8#1:19 +13#1:21 +13#1:23 +13#1,6:24 +13#1:31 +7#1:18 +9#1:20 +13#1:22 +13#1:30 +*E diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 553b19fcf49..36d68165187 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -3255,6 +3255,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @TestMetadata("interleavedFiles.kt") + public void testInterleavedFiles() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); + } + @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index debc1db7098..a8a64602428 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3255,6 +3255,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @TestMetadata("interleavedFiles.kt") + public void testInterleavedFiles() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); + } + @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index 31f30af9b2a..620e48fc5d1 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -3255,6 +3255,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @TestMetadata("interleavedFiles.kt") + public void testInterleavedFiles() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); + } + @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 8de6c51ea8f..19f87a6a4a2 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3255,6 +3255,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @TestMetadata("interleavedFiles.kt") + public void testInterleavedFiles() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); + } + @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.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 5a622c98eb6..c688bfe5db4 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 @@ -2870,6 +2870,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @TestMetadata("interleavedFiles.kt") + public void testInterleavedFiles() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); + } + @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.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 32d5d5e1784..2fd51a1f639 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 @@ -2870,6 +2870,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @TestMetadata("interleavedFiles.kt") + public void testInterleavedFiles() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); + } + @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt");