Files
Andrey Cherkasov 5bbaa6b1ec [kotlin] Port SurroundWithNullCheckFix to K2
^KTIJ-29540

GitOrigin-RevId: 4c60378b27eb11ca86b9268487f77924a102f49f
2024-05-07 05:41:03 +00:00

10 lines
445 B
Kotlin

// "Surround with null check" "true"
// ERROR: 'when' expression must be exhaustive, add necessary 'false' branch or 'else' branch instead
fun foo(arg: Int?, flag: Boolean) {
when (flag) {
true -> arg<caret>.inc()
}
}
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix