Don't track lookups to EnumEntryScope and when check names in constraints
This commit is contained in:
@@ -556,7 +556,7 @@ public class DescriptorResolver {
|
||||
|
||||
Name name = nameExpression.getReferencedNameAsName();
|
||||
|
||||
ClassifierDescriptor classifier = ScopeUtilsKt.findClassifier(scope, name, NoLookupLocation.UNSORTED);
|
||||
ClassifierDescriptor classifier = ScopeUtilsKt.findClassifier(scope, name, NoLookupLocation.FOR_NON_TRACKED_SCOPE);
|
||||
if (classifier instanceof TypeParameterDescriptor && classifier.getContainingDeclaration() == descriptor) continue;
|
||||
|
||||
if (classifier != null) {
|
||||
|
||||
+4
-4
@@ -209,7 +209,7 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
|
||||
@NotNull
|
||||
@SuppressWarnings("unchecked")
|
||||
private Collection<PropertyDescriptor> computeProperties(@NotNull Name name) {
|
||||
return resolveFakeOverrides(name, (Collection) getSupertypeScope().getProperties(name, NoLookupLocation.UNSORTED));
|
||||
return resolveFakeOverrides(name, (Collection) getSupertypeScope().getProperties(name, NoLookupLocation.FOR_NON_TRACKED_SCOPE));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -220,7 +220,7 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
|
||||
|
||||
@NotNull
|
||||
private Collection<FunctionDescriptor> computeFunctions(@NotNull Name name) {
|
||||
return resolveFakeOverrides(name, getSupertypeScope().getFunctions(name, NoLookupLocation.UNSORTED));
|
||||
return resolveFakeOverrides(name, getSupertypeScope().getFunctions(name, NoLookupLocation.FOR_NON_TRACKED_SCOPE));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -276,8 +276,8 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
|
||||
private Collection<DeclarationDescriptor> computeAllDeclarations() {
|
||||
Collection<DeclarationDescriptor> result = new HashSet<DeclarationDescriptor>();
|
||||
for (Name name : enumMemberNames.invoke()) {
|
||||
result.addAll(getFunctions(name, NoLookupLocation.UNSORTED));
|
||||
result.addAll(getProperties(name, NoLookupLocation.UNSORTED));
|
||||
result.addAll(getFunctions(name, NoLookupLocation.FOR_NON_TRACKED_SCOPE));
|
||||
result.addAll(getProperties(name, NoLookupLocation.FOR_NON_TRACKED_SCOPE));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user