Files
kotlin/compiler/testData/codegen/box/constants/comparisonFalse.kt
Ting-Yuan Huang 79fcaae991 Implement constant folding in the IR backend for JVM
The newly added pass folds the set of constant functions of the
current backend, plus IrBuiltIns.
2019-03-20 21:02:55 +01:00

17 lines
338 B
Kotlin
Vendored

// WITH_RUNTIME
// IGNORE_BACKEND: JS_IR
fun foo(): Array<Boolean> {
return arrayOf(
0.0 / 0 == 0.0 / 0,
0.0F > -0.0F,
0.0.equals(-0.0),
(0.0 / 0.0).equals(1.0 / 0.0)
)
}
fun box(): String {
if (foo().any { it == true })
return "fail: ${foo().contentDeepToString()}"
return "OK"
}