Don't track lookups to EnumEntryScope and when check names in constraints

This commit is contained in:
Zalim Bashorov
2015-10-30 16:42:21 +03:00
parent 5a6bcea826
commit d78d96a856
2 changed files with 5 additions and 5 deletions
@@ -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) {
@@ -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;
}