diff --git a/compiler/testData/codegen/boxInline/private/kt8094.1.kt b/compiler/testData/codegen/boxInline/private/kt8094.1.kt new file mode 100644 index 00000000000..8665d107c17 --- /dev/null +++ b/compiler/testData/codegen/boxInline/private/kt8094.1.kt @@ -0,0 +1,8 @@ +import test.* + +fun box(): String { + var r = "fail" + X.g { r = "OK" } + + return r; +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/kt8094.2.kt b/compiler/testData/codegen/boxInline/private/kt8094.2.kt new file mode 100644 index 00000000000..b0c0aec6915 --- /dev/null +++ b/compiler/testData/codegen/boxInline/private/kt8094.2.kt @@ -0,0 +1,10 @@ +package test + +object X { + private fun f() { } + + internal inline fun g(x: () -> Unit) { + x() + f() + } +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java index b74f141166a..7c1c6a021ac 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java @@ -1003,6 +1003,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.1.kt$"), true); } + @TestMetadata("kt8094.1.kt") + public void testKt8094() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + @TestMetadata("privateInInlineInMultiFileFacade.1.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.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 dd1286efdb7..da2f126d68b 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1003,6 +1003,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.1.kt$"), true); } + @TestMetadata("kt8094.1.kt") + public void testKt8094() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + @TestMetadata("privateInInlineInMultiFileFacade.1.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.1.kt");