Replace with for-each: add new-line if necessary #KT-15858 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
ae7f60a96e
commit
7f880bf58c
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
<caret>for (l in listOf(1, 2)) {
|
||||
/* comment */
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
listOf(1, 2).forEach { l -> /* comment */ }
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
fun test() {
|
||||
<caret>for (l in listOf(1, 2)) {
|
||||
// comment
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
fun test() {
|
||||
listOf(1, 2).forEach { l ->
|
||||
// comment
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
<caret>for (l in listOf(1, 2)) {
|
||||
foo() // comment
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
listOf(1, 2).forEach { l ->
|
||||
foo() // comment
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
<caret>for (l in listOf(1, 2)) {
|
||||
foo(); foo() // comment
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
listOf(1, 2).forEach { l ->
|
||||
foo(); foo() // comment
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user