Remove braces intention: fix caret position

#KT-31443 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-05-16 12:07:33 +09:00
committed by Dmitry Gridin
parent 90c3269502
commit 04638eea6b
7 changed files with 16 additions and 9 deletions
@@ -3,5 +3,5 @@ fun test(b: Boolean) {
val list1 = mutableListOf(1)
val list2 = mutableListOf(2)
(if (b) list1 else list2).add(3)
(if (b) list1 else <caret>list2).add(3)
}
@@ -3,5 +3,5 @@ fun test(b: Boolean) {
val list1 = mutableListOf(1)
val list2 = mutableListOf(2)
if (b) {list1} else <caret>{list2} += 3
if (b) {list1} else {list2}<caret> += 3
}
@@ -3,5 +3,5 @@ fun test(b: Boolean) {
val list1 = mutableListOf(1)
val list2 = mutableListOf(2)
(if (b) {list1} else list2) += 3
(if (b) {list1} else list2<caret>) += 3
}
+1 -1
View File
@@ -1,5 +1,5 @@
fun <T> doSomething(a: T) {}
fun foo() {
for (i in 1..4) doSomething("test")
for (i in 1..4) <caret>doSomething("test")
}
@@ -1,5 +1,5 @@
fun foo(a: List<Int>) {
for (x in a) <caret>{
val y = x
for (x in a) {
val<caret> y = x
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
fun <T> doSomething(a: T) {}
fun foo() {
if (true) doSomething("test")
if (true) doSomething("test")<caret>
}