From 394c68c3266f6e87f909fe1902a74240d32f5e77 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Thu, 2 Mar 2017 14:17:22 +0300 Subject: [PATCH] Minor. Move unwrapping of FunctionImportedFromObject It should not affect the semantics, because mapSignatureWithCustomParameters can only be called with FunctionImportedFromObject from mapSignature. At the same time it's very nice to have all of these kinds of custom unwrapping in the same place --- .../jetbrains/kotlin/codegen/state/KotlinTypeMapper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java index 0287239dced..7614a3cb44d 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java @@ -1034,6 +1034,10 @@ public class KotlinTypeMapper { return mapSignature(((TypeAliasConstructorDescriptor) f).getUnderlyingConstructorDescriptor(), kind, skipGenericSignature); } + if (f instanceof FunctionImportedFromObject) { + return mapSignature(((FunctionImportedFromObject) f).getCallableFromObject(), kind, skipGenericSignature); + } + if (CoroutineCodegenUtilKt.isSuspendFunctionNotSuspensionView(f)) { return mapSignature(CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(f), kind, skipGenericSignature); } @@ -1052,10 +1056,6 @@ public class KotlinTypeMapper { @NotNull List valueParameters, boolean skipGenericSignature ) { - if (f instanceof FunctionImportedFromObject) { - return mapSignature(((FunctionImportedFromObject) f).getCallableFromObject(), kind, skipGenericSignature); - } - checkOwnerCompatibility(f); JvmSignatureWriter sw = skipGenericSignature || f instanceof AccessorForCallableDescriptor