Files
kotlin-fork/idea/testData/inspectionsLocal/moveVariableDeclarationIntoWhen/notApplicableInBinaryExpression.kt
T
2019-03-21 16:32:41 +07:00

10 lines
153 B
Kotlin
Vendored

// PROBLEM: none
fun test() = true
fun foo(): Int {
val a<caret> = test()
return null ?: when (a) {
true -> 42
else -> 5
}
}