getDeclaredCallableMembers() fixed for lazy classes
Otherwise synthesized members were not included
This commit is contained in:
+2
-7
@@ -206,16 +206,11 @@ public abstract class AbstractLazyMemberScope<D extends DeclarationDescriptor, D
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<DeclarationDescriptor> getAllDescriptors() {
|
||||
Collection<DeclarationDescriptor> result = new LinkedHashSet<DeclarationDescriptor>(getDescriptorsFromDeclaredElements());
|
||||
Collection<DeclarationDescriptor> result = new LinkedHashSet<DeclarationDescriptor>(descriptorsFromDeclaredElements.invoke());
|
||||
result.addAll(extraDescriptors.invoke());
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
/*package*/ Collection<DeclarationDescriptor> getDescriptorsFromDeclaredElements() {
|
||||
return descriptorsFromDeclaredElements.invoke();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private Collection<DeclarationDescriptor> computeDescriptorsFromDeclaredElements() {
|
||||
List<JetDeclaration> declarations = declarationProvider.getAllDeclarations();
|
||||
@@ -287,4 +282,4 @@ public abstract class AbstractLazyMemberScope<D extends DeclarationDescriptor, D
|
||||
p.popIndent();
|
||||
p.println("}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -225,7 +225,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements LazyEnti
|
||||
public Collection<CallableMemberDescriptor> getDeclaredCallableMembers() {
|
||||
//noinspection unchecked
|
||||
return (Collection) KotlinPackage.filter(
|
||||
unsubstitutedMemberScope.getDescriptorsFromDeclaredElements(),
|
||||
unsubstitutedMemberScope.getAllDescriptors(),
|
||||
new Function1<DeclarationDescriptor, Boolean>() {
|
||||
@Override
|
||||
public Boolean invoke(DeclarationDescriptor descriptor) {
|
||||
|
||||
Reference in New Issue
Block a user