diff --git a/idea/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java b/idea/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java index c0fa67291bc..9d1d56592c7 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java @@ -16,7 +16,7 @@ import java.util.List; /** * @author abreslav */ -/*package*/ abstract class TaskPrioritizer { +/*package*/ abstract class TaskPrioritizer { public static void splitLexicallyLocalDescriptors( Collection allDescriptors, DeclarationDescriptor containerOfTheCurrentLocality, List local, List nonlocal) { @@ -59,27 +59,29 @@ import java.util.List; return false; } - public List> computePrioritizedTasks(JetScope scope, JetType receiverType, Call call, String name) { - List> result = Lists.newArrayList(); + public List> computePrioritizedTasks(JetScope scope, JetType receiverType, Call call, String name) { + List> result = Lists.newArrayList(); if (receiverType != null) { - Collection extensionFunctions = getExtensionsByName(scope, name); + Collection extensionFunctions = getExtensionsByName(scope, name); - List nonlocals = Lists.newArrayList(); - List locals = Lists.newArrayList(); - splitLexicallyLocalDescriptors(extensionFunctions, scope.getContainingDeclaration(), locals, nonlocals); + List nonlocals = Lists.newArrayList(); + List locals = Lists.newArrayList(); + //noinspection unchecked,RedundantTypeArguments + TaskPrioritizer.splitLexicallyLocalDescriptors(extensionFunctions, scope.getContainingDeclaration(), locals, nonlocals); - Collection members = getMembersByName(receiverType, name); + Collection members = getMembersByName(receiverType, name); addTask(result, receiverType, call, locals); addTask(result, null, call, members); addTask(result, receiverType, call, nonlocals); } else { - Collection functions = getNonExtensionsByName(scope, name); + Collection functions = getNonExtensionsByName(scope, name); - List nonlocals = Lists.newArrayList(); - List locals = Lists.newArrayList(); - splitLexicallyLocalDescriptors(functions, scope.getContainingDeclaration(), locals, nonlocals); + List nonlocals = Lists.newArrayList(); + List locals = Lists.newArrayList(); + //noinspection unchecked,RedundantTypeArguments + TaskPrioritizer.splitLexicallyLocalDescriptors(functions, scope.getContainingDeclaration(), locals, nonlocals); addTask(result, receiverType, call, locals); @@ -89,20 +91,20 @@ import java.util.List; } @NotNull - protected abstract Collection getNonExtensionsByName(JetScope scope, String name); + protected abstract Collection getNonExtensionsByName(JetScope scope, String name); @NotNull - protected abstract Collection getMembersByName(@NotNull JetType receiverType, String name); + protected abstract Collection getMembersByName(@NotNull JetType receiverType, String name); @NotNull - protected abstract Collection getExtensionsByName(JetScope scope, String name); + protected abstract Collection getExtensionsByName(JetScope scope, String name); - private void addTask(@NotNull List> result, @Nullable JetType receiverType, @NotNull Call call, @NotNull Collection candidates) { + private void addTask(@NotNull List> result, @Nullable JetType receiverType, @NotNull Call call, @NotNull Collection candidates) { if (candidates.isEmpty()) return; result.add(createTask(receiverType, call, candidates)); } @NotNull - protected abstract ResolutionTask createTask(JetType receiverType, Call call, Collection candidates); + protected abstract ResolutionTask createTask(JetType receiverType, Call call, Collection candidates); }