Replace deprecated lambda syntax in testData

It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
This commit is contained in:
Denis Zharkov
2015-09-23 20:07:06 +03:00
parent 5f69789636
commit 73799e2c3c
73 changed files with 325 additions and 340 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
fun foo() {
val (i :Int, s :String) = bar()
val h = {() :Unit -> bar() }
val h = { -> bar() }
for (i :Int in collection) {
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
fun foo() {
val (i: Int, s: String) = bar()
val h = {(): Unit -> bar() }
val h = { -> bar() }
for (i: Int in collection) {
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
fun foo() {
val (i:Int,s:String) = bar()
val h = {():Unit -> bar()}
val h = { -> bar()}
for (i:Int in collection) {
}
}
+3 -3
View File
@@ -16,19 +16,19 @@ fun test3(): Int {
}
fun test4(): Int {
return synchronized(this) {(): Int ->
return synchronized(this) { ->
return@synchronized 12
}
}
fun test5(): Int {
return synchronized(this) {(): Int ->
return synchronized(this) { ->
return@synchronized 12
}
}
fun test6(): Int {
return synchronized(this) {(): Int ->
return synchronized(this) { ->
return
@synchronized
+3 -3
View File
@@ -16,19 +16,19 @@ fun test3(): Int {
}
fun test4(): Int {
return synchronized(this) {(): Int ->
return synchronized(this) { ->
return@synchronized 12
}
}
fun test5(): Int {
return synchronized(this) {(): Int ->
return synchronized(this) { ->
return @synchronized 12
}
}
fun test6(): Int {
return synchronized(this) {(): Int ->
return synchronized(this) { ->
return
@synchronized
@@ -2,7 +2,7 @@ fun test(some: (Int) -> Int) {
}
fun foo() = test() {it}
val function = test {(a: Int) -> a}
val function = test {a: Int -> a}
val function1 = test {a: Int -> a}
val function2 = test { }
val function3 = test {}
+1 -1
View File
@@ -2,7 +2,7 @@ fun test(some: (Int) -> Int) {
}
fun foo() = test() { it }
val function = test {(a: Int) -> a }
val function = test { a: Int -> a }
val function1 = test { a: Int -> a }
val function2 = test { }
val function3 = test {}
+1 -1
View File
@@ -2,7 +2,7 @@ fun test(some: (Int) -> Int) {
}
fun foo() = test() { it }
val function = test { (a: Int) -> a }
val function = test { a: Int -> a }
val function1 = test {a : Int -> a}
val function2 = test { }
val function3 = test {}
@@ -1,4 +1,4 @@
fun <T> test(a: Int) = {(a: Int) -> a }
fun <T> test(a: Int) = { a: Int -> a }
class Test<T>
fun foo() {
@@ -1,4 +1,4 @@
fun < T > test( a: Int ) = {( a: Int ) -> a }
fun < T > test( a: Int ) = { a: Int -> a }
class Test< T >
fun foo( ) {