Bug fix in intention to move lambda outside parentheses, handles commas better

This commit is contained in:
Tal Man
2014-05-07 19:33:40 -04:00
parent 33fd82cf45
commit 0032fb3575
8 changed files with 90 additions and 9 deletions
@@ -0,0 +1,9 @@
// IS_APPLICABLE: true
fun bar(f: () -> Unit) {}
fun foo(a: Int, b: Int) = 2
fun test() {
bar({
<caret>val a = foo(1, 2)
})
}
@@ -0,0 +1,9 @@
// IS_APPLICABLE: true
fun bar(f: () -> Unit) {}
fun foo(a: Int, b: Int) = 2
fun test() {
bar {
val a = foo(1, 2)
}
}
@@ -0,0 +1,9 @@
// IS_APPLICABLE: true
fun bar(x: Int, f: () -> Unit) {}
fun foo(a: Int, b: Int) = 2
fun test() {
bar(1, {
<caret>val a = foo(1, 2)
})
}
@@ -0,0 +1,9 @@
// IS_APPLICABLE: true
fun bar(x: Int, f: () -> Unit) {}
fun foo(a: Int, b: Int) = 2
fun test() {
bar(1) {
val a = foo(1, 2)
}
}
@@ -0,0 +1,9 @@
// IS_APPLICABLE: true
fun bar(a: Int, b: Int, f: () -> Unit) {}
fun foo(a: Int, b: Int) = 2
fun test() {
bar(1, 2, /* , , */ {
<caret>val a = foo(1, 2)
})
}
@@ -0,0 +1,9 @@
// IS_APPLICABLE: true
fun bar(a: Int, b: Int, f: () -> Unit) {}
fun foo(a: Int, b: Int) = 2
fun test() {
bar(1, 2) {
val a = foo(1, 2)
}
}