Files
kotlin-fork/compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.kt
T
Mads Ager e8a640851a FIR: Change the Fir2Ir handling of smart casts.
Generate the expression with the original type and then insert
an implicit conversion. That matches the behavior of psi2ir
better and therefore avoids breaking backend assumptions.

In particular, IrGetValue expects the type of the underlying
symbol and the type of the IrGetValue to be the same.
2020-01-31 09:31:52 +01:00

4 lines
201 B
Kotlin
Vendored

// FIR_IDENTICAL
fun testD(x: Comparable<Double>, y: Comparable<Double>) = x is Double && y is Double && x < y
fun testF(x: Comparable<Float>, y: Comparable<Float>) = x is Float && y is Float && x < y