Add quickfix for SENSELESS_NULL_IN_WHEN to remove redundant when branch
#KT-24556 Fixed
This commit is contained in:
committed by
Yan Zhulanow
parent
668473c337
commit
5abb6bc7a5
@@ -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 -> ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user