Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt
T
2021-05-25 13:28:29 +03:00

20 lines
409 B
Kotlin
Vendored

// FIR_IDENTICAL
// NI_EXPECTED_FILE
val test1 = { when (true) { true -> 1; else -> "" } }
val test2 = { { when (true) { true -> 1; else -> "" } } }
val test3: (Boolean) -> Any = { when (true) { true -> 1; else -> "" } }
val test4: (Boolean) -> Any? = { when (true) { true -> 1; else -> "" } }
fun println() {}
val test5 = {
when (true) {
true -> println()
else -> println()
}
}