Introduce "cascade if" inspection suggesting replacement with when
So #KT-18615 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
1ddaee5b4a
commit
8273eff1a1
@@ -0,0 +1,11 @@
|
||||
fun println(s: String) {}
|
||||
|
||||
fun test(x: Double, a: Boolean, b: Boolean) {
|
||||
if (x > 0.0) {
|
||||
when {
|
||||
a -> println("a")
|
||||
b -> println("b")
|
||||
else -> println("none")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user