mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
22 lines
345 B
Kotlin
Vendored
22 lines
345 B
Kotlin
Vendored
fun printlnMock(a: Any) {}
|
|
|
|
public fun testCoalesce() {
|
|
val value: String = when {
|
|
true -> {
|
|
if (true) {
|
|
"foo"
|
|
} else {
|
|
"bar"
|
|
}
|
|
}
|
|
else -> "Hello world"
|
|
}
|
|
|
|
printlnMock(value.length)
|
|
}
|
|
|
|
fun box(): String {
|
|
testCoalesce()
|
|
return "OK"
|
|
}
|