Add quickfix for SENSELESS_NULL_IN_WHEN to remove redundant when branch

#KT-24556 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-12-04 18:04:34 +09:00
committed by Yan Zhulanow
parent 668473c337
commit 5abb6bc7a5
6 changed files with 42 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
// "Remove branch" "true"
fun test(x: Int): String {
return when (x) {
1 -> "1"
2 -> "2"
<caret>null -> "null"
else -> ""
}
}
@@ -0,0 +1,8 @@
// "Remove branch" "true"
fun test(x: Int): String {
return when (x) {
1 -> "1"
2 -> "2"
else -> ""
}
}