Fix to a bug in the intention to move lambda expressions inside parentheses, type arguments were being deleted

This commit is contained in:
Tal Man
2014-03-07 12:02:32 -05:00
committed by Andrey Breslav
parent 5362b81ea5
commit baac1b9b0b
8 changed files with 67 additions and 2 deletions
@@ -0,0 +1,8 @@
// IS_APPLICABLE: true
fun foo() {
bar<String>("x") <caret>{ it }
}
fun bar<T>(t:T, a: Int->Int) : Int {
return a(1)
}
@@ -0,0 +1,8 @@
// IS_APPLICABLE: true
fun foo() {
bar<String>("x", { it })
}
fun bar<T>(t:T, a: Int->Int) : Int {
return a(1)
}
@@ -0,0 +1,8 @@
// IS_APPLICABLE: true
fun foo() {
bar<String> <caret>{ it }
}
fun bar<T>(a: (Int)->T): T {
return a(1)
}
@@ -0,0 +1,8 @@
// IS_APPLICABLE: true
fun foo() {
bar<String>({ it })
}
fun bar<T>(a: (Int)->T): T {
return a(1)
}
@@ -0,0 +1,8 @@
// IS_APPLICABLE: true
fun foo() {
bar<String, Int, Int>("x", 1, 2) <caret>{ it }
}
fun bar<T, V, K>(t: T, v: V, k: K, a: (Int)->Int): Int {
return a(1)
}
@@ -0,0 +1,8 @@
// IS_APPLICABLE: true
fun foo() {
bar<String, Int, Int>("x", 1, 2, { it })
}
fun bar<T, V, K>(t: T, v: V, k: K, a: (Int)->Int): Int {
return a(1)
}