diff --git a/compiler/testData/codegen/box/closures/localClassFunClosure.kt b/compiler/testData/codegen/box/closures/localClassFunClosure.kt new file mode 100644 index 00000000000..ba0ae9734a0 --- /dev/null +++ b/compiler/testData/codegen/box/closures/localClassFunClosure.kt @@ -0,0 +1,8 @@ +fun box(): String { + val o = "O" + fun ok() = o + "K" + class OK { + val ok = ok() + } + return OK().ok +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/closures/localClassLambdaClosure.kt b/compiler/testData/codegen/box/closures/localClassLambdaClosure.kt new file mode 100644 index 00000000000..61fcbb61243 --- /dev/null +++ b/compiler/testData/codegen/box/closures/localClassLambdaClosure.kt @@ -0,0 +1,8 @@ +fun box(): String { + val o = "O" + val ok_L = {o + "K"} + class OK { + val ok = ok_L() + } + return OK().ok +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java index a106a301601..ec4ff9a98bb 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java @@ -1674,6 +1674,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest(fileName); } + @TestMetadata("localClassFunClosure.kt") + public void testLocalClassFunClosure() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); + doTest(fileName); + } + + @TestMetadata("localClassLambdaClosure.kt") + public void testLocalClassLambdaClosure() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); + doTest(fileName); + } + @TestMetadata("localFunctionInFunction.kt") public void testLocalFunctionInFunction() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt");