Files
kotlin-fork/idea/testData/quickfix/smartCastImpossibleInIfThen/ifThenElse3.kt
T

13 lines
239 B
Kotlin
Vendored

// "Replace 'if' expression with elvis expression" "true"
// WITH_RUNTIME
class Test {
var x: String? = ""
fun test() {
val i = if (x != null) foo(<caret>x) else bar()
}
fun foo(s: String) = 1
fun bar() = 0
}