Invert if condition intention: 'isEmpty' <-> 'isNotEmpty'
#KT-34593 Fixed
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
79c15e49b6
commit
d5e71ebef1
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isEmpty()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isNotEmpty()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isNotEmpty()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isEmpty()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (!s.isEmpty()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isEmpty()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (!s.isNotEmpty()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isNotEmpty()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user