Generate proper generic signature for closure classes
This commit is contained in:
@@ -6,22 +6,22 @@ fun check(expected: String, obj: Any?) {
|
||||
|
||||
|
||||
fun box(): String {
|
||||
check("jet.FunctionImpl0<jet.Unit>")
|
||||
check("jet.FunctionImpl0<? extends jet.Unit>")
|
||||
{ () : Unit -> }
|
||||
check("jet.FunctionImpl0<java.lang.Integer>")
|
||||
check("jet.FunctionImpl0<? extends java.lang.Integer>")
|
||||
{ () : Int -> 42 }
|
||||
check("jet.FunctionImpl1<java.lang.String, java.lang.Long>")
|
||||
check("jet.FunctionImpl1<? super java.lang.String, ? extends java.lang.Long>")
|
||||
{ (s: String) : Long -> 42.toLong() }
|
||||
check("jet.FunctionImpl2<java.lang.Integer, java.lang.Integer, jet.Unit>")
|
||||
check("jet.FunctionImpl2<? super java.lang.Integer, ? super java.lang.Integer, ? extends jet.Unit>")
|
||||
{ (x: Int, y: Int) : Unit -> }
|
||||
|
||||
check("jet.ExtensionFunctionImpl0<java.lang.Integer, jet.Unit>")
|
||||
check("jet.ExtensionFunctionImpl0<? super java.lang.Integer, ? extends jet.Unit>")
|
||||
{ Int.() : Unit -> }
|
||||
check("jet.ExtensionFunctionImpl0<jet.Unit, java.lang.Integer>")
|
||||
check("jet.ExtensionFunctionImpl0<? super jet.Unit, ? extends java.lang.Integer>")
|
||||
{ Unit.() : Int -> 42 }
|
||||
check("jet.ExtensionFunctionImpl1<java.lang.String, java.lang.String, java.lang.Long>")
|
||||
check("jet.ExtensionFunctionImpl1<? super java.lang.String, ? super java.lang.String, ? extends java.lang.Long>")
|
||||
{ String.(s: String) : Long -> 42.toLong() }
|
||||
check("jet.ExtensionFunctionImpl2<java.lang.Integer, java.lang.Integer, java.lang.Integer, jet.Unit>")
|
||||
check("jet.ExtensionFunctionImpl2<? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.Integer, ? extends jet.Unit>")
|
||||
{ Int.(x: Int, y: Int) : Unit -> }
|
||||
|
||||
return "OK"
|
||||
|
||||
Reference in New Issue
Block a user