"Simplify comparison": remove if when possible after applying quickfix
#KT-25995 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
688fc386b6
commit
5c83c247d7
+4
-2
@@ -5,7 +5,9 @@ fun foo(x: String?) {
|
||||
}
|
||||
else {
|
||||
if (<caret>x == null) {
|
||||
|
||||
bar()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
@@ -4,8 +4,7 @@ fun foo(x: String?) {
|
||||
|
||||
}
|
||||
else {
|
||||
if (false) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int) {
|
||||
if (<caret>x != null) {
|
||||
|
||||
bar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int) {
|
||||
if (true) {
|
||||
bar()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
fun bar() {}
|
||||
Reference in New Issue
Block a user