Files
Anna Kozlova 57544b18ba [kotlin] k2: support smart cast impossible in if expression
^KTIJ-29613 fixed

GitOrigin-RevId: b64964bffa98b8ed4fe175657a6c2f89b7646046
2024-09-23 18:25:18 +00:00

13 lines
421 B
Kotlin

// "Replace 'if' expression with safe access expression" "true"
// WITH_STDLIB
class Test {
var x: String? = ""
fun test() {
if (x != null) foo(<caret>x)
}
fun foo(s: String) = 1
}
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SmartCastImpossibleInIfThenFactory$createQuickFix$1
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.IfThenToSafeAccessFix$asModCommandAction$1