diff --git a/compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt b/compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt new file mode 100644 index 00000000000..bb92bf0e29a --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt @@ -0,0 +1,21 @@ +// !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JS, JS_IR, JVM_IR +// WITH_RUNTIME + +// FILE: test.kt +inline class R(private val r: Int) { + + companion object { + @JvmField + val ok = "OK" + } +} + +fun box() = J.test() + +// FILE: J.java +public class J { + public static String test() { + return R.ok; + } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index b7c5d1a7da3..600afc5433f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -11779,6 +11779,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt"); } + @TestMetadata("jvmFieldInInlineClassCompanion.kt") + public void testJvmFieldInInlineClassCompanion() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); + } + @TestMetadata("kt25246.kt") public void testKt25246() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 18a49d56ac2..00a260ba5ce 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -11779,6 +11779,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt"); } + @TestMetadata("jvmFieldInInlineClassCompanion.kt") + public void testJvmFieldInInlineClassCompanion() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); + } + @TestMetadata("kt25246.kt") public void testKt25246() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index f430d27d23d..7e58f69a42d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -11784,6 +11784,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt"); } + @TestMetadata("jvmFieldInInlineClassCompanion.kt") + public void testJvmFieldInInlineClassCompanion() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); + } + @TestMetadata("kt25246.kt") public void testKt25246() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java index 0f039fa60d6..2fd87df463a 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java @@ -10319,6 +10319,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt"); } + @TestMetadata("jvmFieldInInlineClassCompanion.kt") + public void testJvmFieldInInlineClassCompanion() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); + } + @TestMetadata("kt25246.kt") public void testKt25246() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 0a4f67b475e..c87f3a0a221 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -11364,6 +11364,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt"); } + @TestMetadata("jvmFieldInInlineClassCompanion.kt") + public void testJvmFieldInInlineClassCompanion() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); + } + @TestMetadata("kt25246.kt") public void testKt25246() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt");