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:
+1
-1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 {}
|
||||
|
||||
@@ -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
@@ -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( ) {
|
||||
|
||||
Reference in New Issue
Block a user