mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
The newly added pass folds the set of constant functions of the current backend, plus IrBuiltIns.
17 lines
338 B
Kotlin
Vendored
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"
|
|
}
|