diff --git a/compiler/testData/codegen/box/constants/privateConst.kt b/compiler/testData/codegen/box/constants/privateConst.kt new file mode 100644 index 00000000000..041cc94e9fd --- /dev/null +++ b/compiler/testData/codegen/box/constants/privateConst.kt @@ -0,0 +1,7 @@ +private const val z = "OK"; + +fun box(): String { + return { + z + }() +} \ 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 ea37e068357..2629fb673b6 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java @@ -1977,6 +1977,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/long.kt"); doTest(fileName); } + + @TestMetadata("privateConst.kt") + public void testPrivateConst() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/privateConst.kt"); + doTest(fileName); + } } @TestMetadata("compiler/testData/codegen/box/controlStructures")