Test for KT-11514: Platform Double is converted to Int when comparing to Int literal
#KT-11514 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
//FILE: Holder.java
|
||||
|
||||
class Holder {
|
||||
public Double value;
|
||||
public Holder(Double value) { this.value = value; }
|
||||
}
|
||||
|
||||
//FILE: test.kt
|
||||
|
||||
import Holder
|
||||
|
||||
fun box(): String {
|
||||
val j = Holder(0.99)
|
||||
return if (j.value > 0) "OK" else "fail"
|
||||
}
|
||||
@@ -730,6 +730,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compareWithBoxedDouble.kt")
|
||||
public void testCompareWithBoxedDouble() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compareWithBoxedLong.kt")
|
||||
public void testCompareWithBoxedLong() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt");
|
||||
|
||||
Reference in New Issue
Block a user