diff --git a/compiler/testData/codegen/bytecodeText/companion/floatingPointCompanionAccess.kt b/compiler/testData/codegen/bytecodeText/companion/floatingPointCompanionAccess.kt new file mode 100644 index 00000000000..aa1bce3422f --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/companion/floatingPointCompanionAccess.kt @@ -0,0 +1,22 @@ + +fun main() { + val dmax = Double.MAX_VALUE + val dmin = Double.MIN_VALUE + val dnan = Double.NaN + val dinfp = Double.POSITIVE_INFINITY + val dinfn = Double.NEGATIVE_INFINITY + + val fmax = Float.MAX_VALUE + val fmin = Float.MIN_VALUE + val fnan = Float.NaN + val finfp = Float.POSITIVE_INFINITY + val finfn = Float.NEGATIVE_INFINITY +} + +// 5 GETSTATIC kotlin/jvm/internal/DoubleCompanionObject.INSTANCE +// 5 GETSTATIC kotlin/jvm/internal/FloatCompanionObject.INSTANCE +// 2 getMAX_VALUE +// 2 getMIN_VALUE +// 2 getNaN +// 2 getPOSITIVE_INFINITY +// 2 getNEGATIVE_INFINITY \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index 8c6b4d2c78b..31821b15e89 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -916,6 +916,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("floatingPointCompanionAccess.kt") + public void testFloatingPointCompanionAccess() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/companion/floatingPointCompanionAccess.kt"); + } + @TestMetadata("kt14258_1.kt") public void testKt14258_1() throws Exception { runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java index 2cbca7415a2..41c5b1da197 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java @@ -916,6 +916,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("floatingPointCompanionAccess.kt") + public void testFloatingPointCompanionAccess() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/companion/floatingPointCompanionAccess.kt"); + } + @TestMetadata("kt14258_1.kt") public void testKt14258_1() throws Exception { runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt");