diff --git a/compiler/testData/codegen/boxInline/private/kt6453.1.kt b/compiler/testData/codegen/boxInline/private/kt6453.1.kt new file mode 100644 index 00000000000..aadb1f4eff1 --- /dev/null +++ b/compiler/testData/codegen/boxInline/private/kt6453.1.kt @@ -0,0 +1,7 @@ +import test.* + +fun box(): String { + var r = "fail" + A().foo { r = it } + return r +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/kt6453.2.kt b/compiler/testData/codegen/boxInline/private/kt6453.2.kt new file mode 100644 index 00000000000..2a0b055ae6f --- /dev/null +++ b/compiler/testData/codegen/boxInline/private/kt6453.2.kt @@ -0,0 +1,8 @@ +package test + +class A() { + private val x = "OK" + internal inline fun foo(p: (String) -> Unit) { + p(x) + } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java index f971895b19f..42b0b9c4b31 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("kt6453.1.kt") + public void testKt6453() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + @TestMetadata("kt8094.1.kt") public void testKt8094() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.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 edd4ea50a50..c4c125248c2 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("kt6453.1.kt") + public void testKt6453() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + @TestMetadata("kt8094.1.kt") public void testKt8094() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.1.kt");