Files
kotlin-fork/compiler/testData/codegen/box/intrinsics/kt52163_boolean.kt
T
Alexander Udalov ba20549e13 Fix JVM target in tests using boolean comparisons
These tests don't work on JVM target 1.6 after 6d664bcd10 because we're
generating `Boolean.compare` which is only available since 1.8. (It is
not a big deal because JVM target 1.6 is prohibited for users now.)
2022-05-06 03:47:25 +02:00

11 lines
158 B
Kotlin
Vendored

// JVM_TARGET: 1.8
fun test(): Int {
val d: Any?
d = true
return d.compareTo(false)
}
fun box(): String =
if (test() == 1) "OK" else "Fail"