Fix reflection on enhanced Java methods, call getOriginal()

Also use the provided mechanism for binding overrides instead of a custom for
loop, because it also binds corresponding value parameters
This commit is contained in:
Alexander Udalov
2015-07-14 13:54:45 +03:00
parent 81ef1c19d8
commit b0db9c5b03
2 changed files with 4 additions and 9 deletions
@@ -37,7 +37,9 @@ import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf
import kotlin.reflect.KotlinReflectionInternalError
object RuntimeTypeMapper {
fun mapSignature(function: FunctionDescriptor): String {
fun mapSignature(possiblySubstitutedFunction: FunctionDescriptor): String {
val function = possiblySubstitutedFunction.getOriginal()
if (function is DeserializedCallableMemberDescriptor) {
val proto = function.proto
if (!proto.hasExtension(JvmProtoBuf.methodSignature)) {