4b99d85322
Implement an intrinsic method for boolean.and operation, and replace ANDAND condition with a call to such intrinsic method.
18 lines
225 B
Kotlin
Vendored
18 lines
225 B
Kotlin
Vendored
var s = ""
|
|
|
|
fun o(): Boolean {
|
|
s += "O"
|
|
return false
|
|
}
|
|
|
|
fun k(): Boolean {
|
|
s += "K"
|
|
return true
|
|
}
|
|
|
|
fun box(): String {
|
|
val b = o() and k()
|
|
if (b)
|
|
return "fail: b should be false"
|
|
return s
|
|
} |