diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/tasks/CallableDescriptorCollectors.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/tasks/CallableDescriptorCollectors.java index a794b208a88..51f59f312b8 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/tasks/CallableDescriptorCollectors.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/tasks/CallableDescriptorCollectors.java @@ -40,11 +40,10 @@ public class CallableDescriptorCollectors { @NotNull @Override public Collection getNonExtensionsByName(JetScope scope, Name name) { - Set functions = Sets.newLinkedHashSet(scope.getFunctions(name)); - for (Iterator iterator = functions.iterator(); iterator.hasNext(); ) { - FunctionDescriptor functionDescriptor = iterator.next(); - if (functionDescriptor.getReceiverParameter() != null) { - iterator.remove(); + Set functions = Sets.newLinkedHashSet(); + for (FunctionDescriptor function : scope.getFunctions(name)) { + if (function.getReceiverParameter() == null) { + functions.add(function); } } addConstructors(scope, name, functions);