b79719d6f5
- Materialize unit when its value is actually needed. - Special-case Unit_getInstance return type at codegen. It should be a proper Unit object instead of a "void"
13 lines
168 B
Kotlin
Vendored
13 lines
168 B
Kotlin
Vendored
fun foo() {}
|
|
|
|
fun box(): String {
|
|
val x = when ("A") {
|
|
"B" -> foo()
|
|
else -> null
|
|
}
|
|
|
|
foo()
|
|
|
|
return if (x == null) "OK" else "Fail"
|
|
}
|