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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user