Fix generic signature for KFunctionN types on JVM

#KT-15473 Fixed
This commit is contained in:
Alexander Udalov
2016-12-29 19:15:47 +03:00
parent bf3b5281a9
commit 0dbb02ec6a
12 changed files with 152 additions and 58 deletions
@@ -0,0 +1,11 @@
// KT-15473 Invalid KFunction byte code signature for callable references
class Request(val id: Long)
open class Foo {
open fun request() = ::Request
}
// method: Foo::request
// jvm signature: ()Lkotlin/reflect/KFunction;
// generic signature: ()Lkotlin/reflect/KFunction<LRequest;>;
@@ -10,6 +10,6 @@ fun box(): String {
return test(Foo()::test)
}
// method: CallableFunctionKt$box$1::invoke
// method: FunctionReferenceInvokeKt$box$1::invoke
// jvm signature: ()Ljava/lang/String;
// generic signature: null
@@ -8,6 +8,6 @@ fun box(): String {
return test(Foo("OK")::a)
}
// method: CallablePropertyKt$box$1::get
// method: PropertyReferenceGetKt$box$1::get
// jvm signature: ()Ljava/lang/Object;
// generic signature: null