Add braces: don't move EOL comment when if statement is single statement
#KT-28619 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
a92cf19641
commit
401d8c2d70
+10
@@ -0,0 +1,10 @@
|
||||
fun test(b: Boolean) {
|
||||
if (b) foo(0)
|
||||
else<caret>
|
||||
while (true) {
|
||||
foo(1)
|
||||
}
|
||||
// comment about call below
|
||||
}
|
||||
|
||||
fun foo(i: Int) {}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fun test(b: Boolean) {
|
||||
if (b) foo(0)
|
||||
else {
|
||||
while (true) {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
// comment about call below
|
||||
}
|
||||
|
||||
fun foo(i: Int) {}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fun test() {
|
||||
if (false)<caret>
|
||||
while (true) {
|
||||
foo(1)
|
||||
}
|
||||
//comment about foo(2)
|
||||
foo(2)
|
||||
}
|
||||
|
||||
fun foo(i: Int) {}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fun test() {
|
||||
if (false) {
|
||||
while (true) {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
//comment about foo(2)
|
||||
foo(2)
|
||||
}
|
||||
|
||||
fun foo(i: Int) {}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test() {
|
||||
if (false)<caret>
|
||||
while (true)
|
||||
foo(1)
|
||||
//comment about foo(2)
|
||||
foo(2)
|
||||
}
|
||||
|
||||
fun foo(i: Int) {}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
fun test() {
|
||||
if (false) {
|
||||
while (true)
|
||||
foo(1)
|
||||
}
|
||||
//comment about foo(2)
|
||||
foo(2)
|
||||
}
|
||||
|
||||
fun foo(i: Int) {}
|
||||
Reference in New Issue
Block a user