Migrate testdata to new lambda syntax
This commit is contained in:
@@ -7,22 +7,22 @@ fun check(expected: String, obj: Any?) {
|
||||
|
||||
fun box(): String {
|
||||
check("kotlin.Function0<kotlin.Unit>")
|
||||
{ () : Unit -> }
|
||||
{ -> }
|
||||
check("kotlin.Function0<java.lang.Integer>")
|
||||
{ () : Int -> 42 }
|
||||
check("kotlin.Function1<java.lang.String, java.lang.Long>")
|
||||
{ (s: String) : Long -> 42.toLong() }
|
||||
{ -> 42 }
|
||||
check("kotlin.Function1<java.lang.String, java.lang.Long>",
|
||||
fun (s: String) = 42.toLong())
|
||||
check("kotlin.Function2<java.lang.Integer, java.lang.Integer, kotlin.Unit>")
|
||||
{ (x: Int, y: Int) : Unit -> }
|
||||
{ x: Int, y: Int -> }
|
||||
|
||||
check("kotlin.ExtensionFunction0<java.lang.Integer, kotlin.Unit>")
|
||||
{ Int.() : Unit -> }
|
||||
check("kotlin.ExtensionFunction0<kotlin.Unit, java.lang.Integer>")
|
||||
{ Unit.() : Int -> 42 }
|
||||
check("kotlin.ExtensionFunction1<java.lang.String, java.lang.String, java.lang.Long>")
|
||||
{ String.(s: String) : Long -> 42.toLong() }
|
||||
check("kotlin.ExtensionFunction2<java.lang.Integer, java.lang.Integer, java.lang.Integer, kotlin.Unit>")
|
||||
{ Int.(x: Int, y: Int) : Unit -> }
|
||||
check("kotlin.ExtensionFunction0<java.lang.Integer, kotlin.Unit>",
|
||||
fun Int.() {})
|
||||
check("kotlin.ExtensionFunction0<kotlin.Unit, java.lang.Integer>",
|
||||
fun Unit.(): Int = 42)
|
||||
check("kotlin.ExtensionFunction1<java.lang.String, java.lang.String, java.lang.Long>",
|
||||
fun String.(s: String): Long = 42.toLong())
|
||||
check("kotlin.ExtensionFunction2<java.lang.Integer, java.lang.Integer, java.lang.Integer, kotlin.Unit>",
|
||||
fun Int.(x: Int, y: Int) {})
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user