Merge methods resolveFunctionDescriptor && resolveFunctionDescriptorWithAnnotationArguments

This commit is contained in:
Stanislav Erokhin
2015-03-02 15:15:34 +03:00
parent dbcb4fb060
commit 07a691f4b7
3 changed files with 3 additions and 15 deletions
@@ -229,7 +229,7 @@ public class DescriptorResolver {
} }
@NotNull @NotNull
public SimpleFunctionDescriptor resolveFunctionDescriptorWithAnnotationArguments( public SimpleFunctionDescriptor resolveFunctionDescriptor(
@NotNull DeclarationDescriptor containingDescriptor, @NotNull DeclarationDescriptor containingDescriptor,
@NotNull JetScope scope, @NotNull JetScope scope,
@NotNull JetNamedFunction function, @NotNull JetNamedFunction function,
@@ -252,18 +252,6 @@ public class DescriptorResolver {
annotationResolver.resolveAnnotationsWithArguments(scope, function.getModifierList(), trace), true); annotationResolver.resolveAnnotationsWithArguments(scope, function.getModifierList(), trace), true);
} }
@NotNull
public SimpleFunctionDescriptor resolveFunctionDescriptor(
@NotNull DeclarationDescriptor containingDescriptor,
@NotNull JetScope scope,
@NotNull JetNamedFunction function,
@NotNull BindingTrace trace,
@NotNull DataFlowInfo dataFlowInfo
) {
return resolveFunctionDescriptor(containingDescriptor, scope, function, trace, dataFlowInfo,
annotationResolver.resolveAnnotationsWithoutArguments(scope, function.getModifierList(), trace), false);
}
@NotNull @NotNull
private SimpleFunctionDescriptor resolveFunctionDescriptor( private SimpleFunctionDescriptor resolveFunctionDescriptor(
@NotNull DeclarationDescriptor containingDescriptor, @NotNull DeclarationDescriptor containingDescriptor,
@@ -69,7 +69,7 @@ public abstract class AbstractLazyMemberScope<D : DeclarationDescriptor, DP : De
val declarations = declarationProvider.getFunctionDeclarations(name) val declarations = declarationProvider.getFunctionDeclarations(name)
for (functionDeclaration in declarations) { for (functionDeclaration in declarations) {
val resolutionScope = getScopeForMemberDeclarationResolution(functionDeclaration) val resolutionScope = getScopeForMemberDeclarationResolution(functionDeclaration)
result.add(c.descriptorResolver.resolveFunctionDescriptorWithAnnotationArguments( result.add(c.descriptorResolver.resolveFunctionDescriptor(
thisDescriptor, thisDescriptor,
resolutionScope, resolutionScope,
functionDeclaration, functionDeclaration,
@@ -74,7 +74,7 @@ public class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Express
val functionDescriptor: SimpleFunctionDescriptor val functionDescriptor: SimpleFunctionDescriptor
if (isStatement) { if (isStatement) {
functionDescriptor = services.getDescriptorResolver().resolveFunctionDescriptorWithAnnotationArguments( functionDescriptor = services.getDescriptorResolver().resolveFunctionDescriptor(
context.scope.getContainingDeclaration(), context.scope, function, context.trace, context.dataFlowInfo) context.scope.getContainingDeclaration(), context.scope, function, context.trace, context.dataFlowInfo)
assert(statementScope != null) { assert(statementScope != null) {
"statementScope must be not null for function: " + function.getName() + " at location " + DiagnosticUtils.atLocation(function) "statementScope must be not null for function: " + function.getName() + " at location " + DiagnosticUtils.atLocation(function)