diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt new file mode 100644 index 00000000000..d3d50981c89 --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt @@ -0,0 +1,14 @@ +import test.* + +interface foo { + fun bar(): String +} + +fun box(): String { + val baz = "OK".myLet { + object : foo { + override fun bar() = it + } + } + return baz.bar() +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt8133.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt8133.2.kt new file mode 100644 index 00000000000..3fbc6806a51 --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt8133.2.kt @@ -0,0 +1,3 @@ +package test + +public inline fun T.myLet(f: (T) -> R): R = f(this) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java index 7abdf1b1648..3a4da929d4f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java @@ -97,6 +97,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo doTestMultiFileWithInlineCheck(fileName); } + @TestMetadata("kt8133.1.kt") + public void testKt8133() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + @TestMetadata("kt9064.1.kt") public void testKt9064() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.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 674e6a2895f..4c5f8f902a8 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -97,6 +97,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi doBoxTestWithInlineCheck(fileName); } + @TestMetadata("kt8133.1.kt") + public void testKt8133() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + @TestMetadata("kt9064.1.kt") public void testKt9064() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.1.kt");