From dbcb4fb0600c9a6d7ba384b8704845c8d45caf99 Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Tue, 24 Feb 2015 20:47:00 +0300 Subject: [PATCH] Minor: used util method --- .../kotlin/types/expressions/FunctionsTypingVisitor.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt index 1d1a64d27c4..1d10bffea6d 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/FunctionsTypingVisitor.kt @@ -131,9 +131,7 @@ public class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Express val safeReturnType = computeReturnType(expression, context, functionDescriptor, functionTypeExpected) functionDescriptor.setReturnType(safeReturnType) - val receiver = DescriptorUtils.getReceiverParameterType(functionDescriptor.getExtensionReceiverParameter()) - val valueParametersTypes = ExpressionTypingUtils.getValueParametersTypes(functionDescriptor.getValueParameters()) - val resultType = components.builtIns.getFunctionType(Annotations.EMPTY, receiver, valueParametersTypes, safeReturnType) + val resultType = createFunctionType(functionDescriptor)!! if (!noExpectedType(expectedType) && KotlinBuiltIns.isFunctionOrExtensionFunctionType(expectedType)) { // all checks were done before return JetTypeInfo.create(resultType, context.dataFlowInfo)