Files
kotlin-fork/compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

20 lines
465 B
Kotlin
Vendored

fun testD(x: Comparable<Double>, y: Comparable<Double>): Boolean {
return when {
when {
x is Double -> y is Double
else -> false
} -> less(arg0 = x /*as Double */, arg1 = y /*as Double */)
else -> false
}
}
fun testF(x: Comparable<Float>, y: Comparable<Float>): Boolean {
return when {
when {
x is Float -> y is Float
else -> false
} -> less(arg0 = x /*as Float */, arg1 = y /*as Float */)
else -> false
}
}