Replace 'if' with 'when': don't remove branch brances
#KT-32650 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
f3b42507d9
commit
80b09b9a08
+4
-6
@@ -2,12 +2,10 @@ fun println(s: String) {}
|
||||
|
||||
fun test(a: Boolean, b: Boolean) {
|
||||
<caret>if (a) {
|
||||
// comment
|
||||
// comment
|
||||
println("a")
|
||||
}
|
||||
else if (b) {
|
||||
println("b")
|
||||
}
|
||||
else {
|
||||
println("none")
|
||||
}
|
||||
else if (b) println("b")
|
||||
else println("none")
|
||||
}
|
||||
Reference in New Issue
Block a user