Minor. Drop redundant parameters of 'inferReturnTypeFromExpressionBody'

Both storageManager and expressionTypingServices must be the same instances
inside the resolution session and can be obtained from the DescriptorResolver fields
This commit is contained in:
Denis Zharkov
2016-11-14 11:56:45 +03:00
parent 77c524de33
commit 51a5bf9f7e
2 changed files with 2 additions and 7 deletions
@@ -1017,9 +1017,7 @@ public class DescriptorResolver {
KtProperty property = getter.getProperty();
if (!property.hasDelegateExpressionOrInitializer() && property.getTypeReference() == null &&
getter.hasBody() && !getter.hasBlockBody()) {
return inferReturnTypeFromExpressionBody(
storageManager, expressionTypingServices, trace, scope, DataFlowInfoFactory.EMPTY, getter, getterDescriptor
);
return inferReturnTypeFromExpressionBody(trace, scope, DataFlowInfoFactory.EMPTY, getter, getterDescriptor);
}
return propertyType;
@@ -1027,8 +1025,6 @@ public class DescriptorResolver {
@NotNull
/*package*/ DeferredType inferReturnTypeFromExpressionBody(
@NotNull StorageManager storageManager,
@NotNull final ExpressionTypingServices expressionTypingServices,
@NotNull final BindingTrace trace,
@NotNull final LexicalScope scope,
@NotNull final DataFlowInfo dataFlowInfo,
@@ -128,8 +128,7 @@ class FunctionDescriptorResolver(
builtIns.unitType
}
else if (function.hasBody()) {
descriptorResolver.inferReturnTypeFromExpressionBody(storageManager, expressionTypingServices, trace, scope,
dataFlowInfo, function, functionDescriptor)
descriptorResolver.inferReturnTypeFromExpressionBody(trace, scope, dataFlowInfo, function, functionDescriptor)
}
else {
ErrorUtils.createErrorType("No type, no body")