diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenUtil.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenUtil.java index c115d3c39b9..4532fbec70b 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenUtil.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenUtil.java @@ -117,7 +117,7 @@ public class InlineCodegenUtil { } }, ClassReader.SKIP_FRAMES | (GENERATE_SMAP ? 0 : ClassReader.SKIP_DEBUG)); - SMAP smap = SMAPParser.parseOrCreateDefault(debugInfo[1], debugInfo[0], classId.toString(), lines[0], lines[1]); + SMAP smap = SMAPParser.parseOrCreateDefault(debugInfo[1], debugInfo[0], classId.asString(), lines[0], lines[1]); return new SMAPAndMethodNode(node[0], smap); } diff --git a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt new file mode 100644 index 00000000000..b63ae10a719 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt @@ -0,0 +1,19 @@ +fun box(): String { + A().foo() + + return "OK" +} + +//SMAP +//classFromDefaultPackage.1.kt +//Kotlin +//*S Kotlin +//*F +//+ 1 classFromDefaultPackage.1.kt +//ClassFromDefaultPackage_1Kt +//+ 2 classFromDefaultPackage.2.kt +//A +//*L +//1#1,20:1 +//2#2:21 +//*E diff --git a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.2.kt b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.2.kt new file mode 100644 index 00000000000..9fe0bdf7cb9 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.2.kt @@ -0,0 +1,3 @@ +class A { + inline fun foo() {} +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java index ab200cec52a..afadd002a2d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java @@ -1225,6 +1225,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo doTestMultiFileWithInlineCheck(fileName); } + @TestMetadata("classFromDefaultPackage.1.kt") + public void testClassFromDefaultPackage() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + @TestMetadata("oneFile.1.kt") public void testOneFile() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.1.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java index 3e327b64420..b158178bc7f 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1225,6 +1225,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi doBoxTestWithInlineCheck(fileName); } + @TestMetadata("classFromDefaultPackage.1.kt") + public void testClassFromDefaultPackage() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + @TestMetadata("oneFile.1.kt") public void testOneFile() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.1.kt");