Files
Frederik Haselmeier 1484418017 [kotlin] Add quick fix for when '&&' is used instead of 'if' in when with a subject
^KTIJ-31306 fixed

GitOrigin-RevId: 71def29b5e8681891f9b6e9be3feb1bda724e175
2024-10-03 12:52:54 +00:00

11 lines
228 B
Plaintext

// IGNORE_K1
// "Replace '&&' with 'if'" "true"
// WITH_STDLIB
fun test(a: Any) {
when (a) {
is Int if a % 2 == 0 -> {}
}
}
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ReplaceAndWithWhenGuardFix