Simplified code.
This commit is contained in:
+4
-5
@@ -40,11 +40,10 @@ public class CallableDescriptorCollectors {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Collection<FunctionDescriptor> getNonExtensionsByName(JetScope scope, Name name) {
|
public Collection<FunctionDescriptor> getNonExtensionsByName(JetScope scope, Name name) {
|
||||||
Set<FunctionDescriptor> functions = Sets.newLinkedHashSet(scope.getFunctions(name));
|
Set<FunctionDescriptor> functions = Sets.newLinkedHashSet();
|
||||||
for (Iterator<FunctionDescriptor> iterator = functions.iterator(); iterator.hasNext(); ) {
|
for (FunctionDescriptor function : scope.getFunctions(name)) {
|
||||||
FunctionDescriptor functionDescriptor = iterator.next();
|
if (function.getReceiverParameter() == null) {
|
||||||
if (functionDescriptor.getReceiverParameter() != null) {
|
functions.add(function);
|
||||||
iterator.remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addConstructors(scope, name, functions);
|
addConstructors(scope, name, functions);
|
||||||
|
|||||||
Reference in New Issue
Block a user