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