Introduce FunctionImpl and ExtensionFunctionImpl classes
Old FunctionImpl0,1,2,... will be dropped since they had no purpose
This commit is contained in:
@@ -6,22 +6,22 @@ fun check(expected: String, obj: Any?) {
|
||||
|
||||
|
||||
fun box(): String {
|
||||
check("kotlin.FunctionImpl0<kotlin.Unit>")
|
||||
check("kotlin.Function0<kotlin.Unit>")
|
||||
{ () : Unit -> }
|
||||
check("kotlin.FunctionImpl0<java.lang.Integer>")
|
||||
check("kotlin.Function0<java.lang.Integer>")
|
||||
{ () : Int -> 42 }
|
||||
check("kotlin.FunctionImpl1<java.lang.String, java.lang.Long>")
|
||||
check("kotlin.Function1<java.lang.String, java.lang.Long>")
|
||||
{ (s: String) : Long -> 42.toLong() }
|
||||
check("kotlin.FunctionImpl2<java.lang.Integer, java.lang.Integer, kotlin.Unit>")
|
||||
check("kotlin.Function2<java.lang.Integer, java.lang.Integer, kotlin.Unit>")
|
||||
{ (x: Int, y: Int) : Unit -> }
|
||||
|
||||
check("kotlin.ExtensionFunctionImpl0<java.lang.Integer, kotlin.Unit>")
|
||||
check("kotlin.ExtensionFunction0<java.lang.Integer, kotlin.Unit>")
|
||||
{ Int.() : Unit -> }
|
||||
check("kotlin.ExtensionFunctionImpl0<kotlin.Unit, java.lang.Integer>")
|
||||
check("kotlin.ExtensionFunction0<kotlin.Unit, java.lang.Integer>")
|
||||
{ Unit.() : Int -> 42 }
|
||||
check("kotlin.ExtensionFunctionImpl1<java.lang.String, java.lang.String, java.lang.Long>")
|
||||
check("kotlin.ExtensionFunction1<java.lang.String, java.lang.String, java.lang.Long>")
|
||||
{ String.(s: String) : Long -> 42.toLong() }
|
||||
check("kotlin.ExtensionFunctionImpl2<java.lang.Integer, java.lang.Integer, java.lang.Integer, kotlin.Unit>")
|
||||
check("kotlin.ExtensionFunction2<java.lang.Integer, java.lang.Integer, java.lang.Integer, kotlin.Unit>")
|
||||
{ Int.(x: Int, y: Int) : Unit -> }
|
||||
|
||||
return "OK"
|
||||
|
||||
Reference in New Issue
Block a user