diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java index ac115746064..6c88e27e448 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java @@ -89,7 +89,7 @@ public class FunctionDescriptorUtil { ReceiverDescriptor.NO_RECEIVER, Collections.emptyList(), JetStandardClasses.getValueParameters(functionDescriptor, functionType), - JetStandardClasses.obtainReturnTypeFromFunctionType(functionType), + JetStandardClasses.getReturnTypeFromFunctionType(functionType), Modality.FINAL, Visibility.LOCAL); } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardClasses.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardClasses.java index fb299e1c86e..55908afd1b6 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardClasses.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardClasses.java @@ -385,7 +385,7 @@ public class JetStandardClasses { } @NotNull - public static JetType obtainReturnTypeFromFunctionType(@NotNull JetType type) { + public static JetType getReturnTypeFromFunctionType(@NotNull JetType type) { assert isFunctionType(type); List arguments = type.getArguments(); return arguments.get(arguments.size() - 1).getType(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java index d6e5645c5fb..41f0705f6aa 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ClosureExpressionsTypingVisitor.java @@ -88,7 +88,7 @@ public class ClosureExpressionsTypingVisitor extends ExpressionTypingVisitor { } else { if (functionTypeExpected) { - returnType = JetStandardClasses.obtainReturnTypeFromFunctionType(expectedType); + returnType = JetStandardClasses.getReturnTypeFromFunctionType(expectedType); } returnType = context.getServices().getBlockReturnedType(functionInnerScope, bodyExpression, CoercionStrategy.COERCION_TO_UNIT, context.replaceExpectedType(returnType).replaceExpectedReturnType(returnType)); @@ -98,7 +98,7 @@ public class ClosureExpressionsTypingVisitor extends ExpressionTypingVisitor { boolean hasDeclaredValueParameters = functionLiteral.getValueParameterList() != null; if (!hasDeclaredValueParameters && functionTypeExpected) { - JetType expectedReturnType = JetStandardClasses.obtainReturnTypeFromFunctionType(expectedType); + JetType expectedReturnType = JetStandardClasses.getReturnTypeFromFunctionType(expectedType); if (JetStandardClasses.isUnit(expectedReturnType)) { functionDescriptor.setReturnType(JetStandardClasses.getUnitType()); return DataFlowUtils.checkType(JetStandardClasses.getFunctionType(Collections.emptyList(), receiver, parameterTypes, JetStandardClasses.getUnitType()), expression, context);