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

16 lines
323 B
Kotlin
Vendored

// "Replace 'if' expression with safe access expression" "false"
// ACTION: Add non-null asserted (!!) call
// ACTION: Introduce local variable
// DISABLE-ERRORS
class Test {
var x: String? = ""
fun test() {
if (x != null) {
bar()
<caret>x.length
}
}
fun bar() {}
}