Skip to content

Commit 394c68c

Browse files
committed
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
1 parent 530214f commit 394c68c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,10 @@ private JvmMethodGenericSignature mapSignature(@NotNull FunctionDescriptor f, @N
10341034
return mapSignature(((TypeAliasConstructorDescriptor) f).getUnderlyingConstructorDescriptor(), kind, skipGenericSignature);
10351035
}
10361036

1037+
if (f instanceof FunctionImportedFromObject) {
1038+
return mapSignature(((FunctionImportedFromObject) f).getCallableFromObject(), kind, skipGenericSignature);
1039+
}
1040+
10371041
if (CoroutineCodegenUtilKt.isSuspendFunctionNotSuspensionView(f)) {
10381042
return mapSignature(CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(f), kind, skipGenericSignature);
10391043
}
@@ -1052,10 +1056,6 @@ public JvmMethodGenericSignature mapSignatureWithCustomParameters(
10521056
@NotNull List<ValueParameterDescriptor> valueParameters,
10531057
boolean skipGenericSignature
10541058
) {
1055-
if (f instanceof FunctionImportedFromObject) {
1056-
return mapSignature(((FunctionImportedFromObject) f).getCallableFromObject(), kind, skipGenericSignature);
1057-
}
1058-
10591059
checkOwnerCompatibility(f);
10601060

10611061
JvmSignatureWriter sw = skipGenericSignature || f instanceof AccessorForCallableDescriptor

0 commit comments

Comments
 (0)