Invert if condition intention: don't remove line breaks
#KT-30900 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
a66aebdc2c
commit
075620daad
@@ -0,0 +1,6 @@
|
||||
fun foo(b: Boolean) {
|
||||
<caret>if (b) bar(1) // comment1
|
||||
else bar(2) // comment2
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun foo(b: Boolean) {
|
||||
if (!b) bar(2) // comment2
|
||||
else bar(1) // comment1
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(b: Boolean) {
|
||||
<caret>if (b)
|
||||
bar(1) // comment1
|
||||
else bar(2) // comment2
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(b: Boolean) {
|
||||
if (!b) bar(2) // comment2
|
||||
else
|
||||
bar(1) // comment1
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(b: Boolean) {
|
||||
<caret>if (b) bar(1) // comment1
|
||||
else
|
||||
bar(2) // comment2
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(b: Boolean) {
|
||||
if (!b)
|
||||
bar(2) // comment2
|
||||
else bar(1) // comment1
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun foo() {
|
||||
<caret>if (true) bar(1)
|
||||
else {
|
||||
bar(2)
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
if (false) {
|
||||
bar(2)
|
||||
} else bar(1)
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
<caret>if (true) {
|
||||
bar(1)
|
||||
} else bar(2)
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun foo() {
|
||||
if (false) bar(2)
|
||||
else {
|
||||
bar(1)
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(i: Int) {}
|
||||
Reference in New Issue
Block a user