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,5 +1,5 @@
|
||||
fun box(): String {
|
||||
return apply("OK", {(arg: String) -> arg })
|
||||
return apply("OK", { arg: String -> arg })
|
||||
}
|
||||
|
||||
fun apply(arg: String, f: (p: String) -> String): String {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun box(): String {
|
||||
return if (apply(5) {(arg: Int) -> arg + 13 } == 18) "OK" else "fail"
|
||||
return if (apply(5) { arg: Int -> arg + 13 } == 18) "OK" else "fail"
|
||||
}
|
||||
|
||||
fun apply(arg: Int, f: (p: Int) -> Int): Int {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Point(val x: Int, val y: Int)
|
||||
|
||||
fun box(): String {
|
||||
val answer = apply(Point(3, 5), { Point.(scalar: Int): Point ->
|
||||
val answer = apply(Point(3, 5), { scalar: Int ->
|
||||
Point(x * scalar, y * scalar)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user