Migrate testdata to new lambda syntax

This commit is contained in:
Stanislav Erokhin
2015-04-03 13:40:07 +03:00
parent b703f59e04
commit 3de0dff575
134 changed files with 263 additions and 277 deletions
@@ -1,6 +1,6 @@
// IS_APPLICABLE: false
val foo = {(<caret>s: String, n: Int) -> s.length() - n/2 > 1 }
val foo = { <caret>s: String, n: Int -> s.length() - n/2 > 1 }
fun test() {
foo("1", 2)
@@ -4,5 +4,5 @@ class Mocha() {
}
fun main() {
val mocha = Mocha()
val testing = mocha<caret>(1, "fire"){ (x: Int) -> "hello world" }
val testing = mocha<caret>(1, "fire"){ x: Int -> "hello world" }
}
@@ -4,5 +4,5 @@ class Mocha() {
}
fun main() {
val mocha = Mocha()
val testing = mocha.invoke(1, "fire"){ (x: Int) -> "hello world" }
val testing = mocha.invoke(1, "fire"){ x: Int -> "hello world" }
}
@@ -3,5 +3,5 @@ class Mocha() {
}
fun main() {
val mocha = Mocha()
val testing = mocha<caret>{ (x: Int) -> "hello world" }
val testing = mocha<caret>{ x: Int -> "hello world" }
}
@@ -3,5 +3,5 @@ class Mocha() {
}
fun main() {
val mocha = Mocha()
val testing = mocha.invoke{ (x: Int) -> "hello world" }
val testing = mocha.invoke{ x: Int -> "hello world" }
}
@@ -1,6 +1,6 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo() {
val bar = { (x: Int) -> x + 1 }
val bar = { x: Int -> x + 1 }
val incremented = listOf(1, 2, 3).<caret>map(bar)
}
@@ -1,6 +1,6 @@
// IS_APPLICABLE: true
fun foo() {
bar<caret><(Int) -> Int> { (it: Int) -> it }
bar<caret><(Int) -> Int> { it: Int -> it }
}
fun bar<T>(t: T): Int = 1
@@ -1,6 +1,6 @@
// IS_APPLICABLE: true
fun foo() {
bar { (it: Int) -> it }
bar { it: Int -> it }
}
fun bar<T>(t: T): Int = 1
@@ -1,6 +1,6 @@
// IS_APPLICABLE: false
val foo = { (x: Int) ->
val foo = { x: Int ->
class Inner() {
fun temp(<caret>y: Int) : Int { return x + y }
}
@@ -1,2 +1,2 @@
// IS_APPLICABLE: false
val incr = { (<caret>x: Int) -> x + 1}
val incr = { <caret>x: Int -> x + 1}
@@ -1 +1 @@
val x<caret> = { (a: Int) -> ""}
val x<caret> = { a: Int -> ""}
@@ -1 +1 @@
val x: (Int) -> String = { (a: Int) -> ""}
val x: (Int) -> String = { a: Int -> ""}