diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/SignaturesPropagationData.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/SignaturesPropagationData.java index 2a795bcf119..31aac10630d 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/SignaturesPropagationData.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/kotlinSignature/SignaturesPropagationData.java @@ -30,6 +30,7 @@ import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.Annotations; import org.jetbrains.kotlin.descriptors.impl.TypeParameterDescriptorImpl; import org.jetbrains.kotlin.descriptors.impl.ValueParameterDescriptorImpl; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.load.java.components.TypeUsage; import org.jetbrains.kotlin.load.java.descriptors.JavaMethodDescriptor; import org.jetbrains.kotlin.load.java.structure.JavaMethod; @@ -44,7 +45,6 @@ import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature; import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmSignaturePackage; import org.jetbrains.kotlin.resolve.jvm.jvmSignature.KotlinToJvmSignatureMapper; import org.jetbrains.kotlin.resolve.scopes.JetScope; -import org.jetbrains.kotlin.incremental.components.LookupLocation; import org.jetbrains.kotlin.types.*; import java.util.*; @@ -303,7 +303,7 @@ public class SignaturesPropagationData { Name name = method.getName(); JvmMethodSignature autoSignature = SIGNATURE_MAPPER.mapToJvmMethodSignature(autoMethodDescriptor); for (JetType supertype : containingClass.getTypeConstructor().getSupertypes()) { - Collection superFunctionCandidates = supertype.getMemberScope().getFunctions(name, LookupLocation.NO_LOCATION); + Collection superFunctionCandidates = supertype.getMemberScope().getFunctions(name, NoLookupLocation.UNSORTED); for (FunctionDescriptor candidate : superFunctionCandidates) { JvmMethodSignature candidateSignature = SIGNATURE_MAPPER.mapToJvmMethodSignature(candidate); if (JvmSignaturePackage.erasedSignaturesEqualIgnoringReturnTypes(autoSignature, candidateSignature)) { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java index c28d95fde81..f8390c66209 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java @@ -28,7 +28,7 @@ import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.Annotations; import org.jetbrains.kotlin.descriptors.impl.*; import org.jetbrains.kotlin.diagnostics.Errors; -import org.jetbrains.kotlin.incremental.components.LookupLocation; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.lexer.JetTokens; import org.jetbrains.kotlin.name.FqName; import org.jetbrains.kotlin.name.Name; @@ -39,7 +39,10 @@ import org.jetbrains.kotlin.resolve.constants.ConstantValue; import org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator; import org.jetbrains.kotlin.resolve.dataClassUtils.DataClassUtilsPackage; import org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil; -import org.jetbrains.kotlin.resolve.scopes.*; +import org.jetbrains.kotlin.resolve.scopes.JetScope; +import org.jetbrains.kotlin.resolve.scopes.JetScopeUtils; +import org.jetbrains.kotlin.resolve.scopes.WritableScope; +import org.jetbrains.kotlin.resolve.scopes.WritableScopeImpl; import org.jetbrains.kotlin.storage.StorageManager; import org.jetbrains.kotlin.types.*; import org.jetbrains.kotlin.types.checker.JetTypeChecker; @@ -520,7 +523,7 @@ public class DescriptorResolver { Name name = nameExpression.getReferencedNameAsName(); - ClassifierDescriptor classifier = scope.getClassifier(name, LookupLocation.NO_LOCATION); + ClassifierDescriptor classifier = scope.getClassifier(name, NoLookupLocation.UNSORTED); if (classifier instanceof TypeParameterDescriptor && classifier.getContainingDeclaration() == descriptor) continue; if (classifier != null) { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.java index d0955ed53c5..ec7d3de25c2 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.java @@ -33,12 +33,12 @@ import org.jetbrains.annotations.ReadOnly; import org.jetbrains.kotlin.builtins.KotlinBuiltIns; import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.lexer.JetTokens; import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.psi.*; import org.jetbrains.kotlin.resolve.calls.callResolverUtil.CallResolverUtilPackage; import org.jetbrains.kotlin.resolve.dataClassUtils.DataClassUtilsPackage; -import org.jetbrains.kotlin.incremental.components.LookupLocation; import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue; import org.jetbrains.kotlin.types.*; import org.jetbrains.kotlin.types.checker.JetTypeChecker; @@ -730,9 +730,9 @@ public class OverrideResolver { ) { for (JetType supertype : declaringClass.getTypeConstructor().getSupertypes()) { Set all = Sets.newLinkedHashSet(); - all.addAll(supertype.getMemberScope().getFunctions(declared.getName(), LookupLocation.NO_LOCATION)); + all.addAll(supertype.getMemberScope().getFunctions(declared.getName(), NoLookupLocation.UNSORTED)); //noinspection unchecked - all.addAll((Collection) supertype.getMemberScope().getProperties(declared.getName(), LookupLocation.NO_LOCATION)); + all.addAll((Collection) supertype.getMemberScope().getProperties(declared.getName(), NoLookupLocation.UNSORTED)); for (CallableMemberDescriptor fromSuper : all) { if (OverridingUtil.DEFAULT.isOverridableBy(fromSuper, declared).getResult() == OVERRIDABLE) { if (Visibilities.isVisible(ReceiverValue.IRRELEVANT_RECEIVER, fromSuper, declared)) { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/CallableDescriptorCollectors.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/CallableDescriptorCollectors.kt index b1fb056d06a..f8d4a540923 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/CallableDescriptorCollectors.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/CallableDescriptorCollectors.kt @@ -19,7 +19,7 @@ package org.jetbrains.kotlin.resolve.calls.tasks.collectors import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.builtins.functions.FunctionInvokeDescriptor import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.incremental.components.LookupLocation +import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.resolve.BindingTrace import org.jetbrains.kotlin.resolve.DescriptorUtils.isStaticNestedClass @@ -102,7 +102,7 @@ private object FunctionCollector : CallableDescriptorCollector, bindingTrace: BindingTrace): Collection { val functions = scope.getFunctions(name) val (extensions, nonExtensions) = functions.partition { it.extensionReceiverParameter != null } - val syntheticExtensions = scope.getSyntheticExtensionFunctions(receiverTypes, name, LookupLocation.NO_LOCATION) + val syntheticExtensions = scope.getSyntheticExtensionFunctions(receiverTypes, name, NoLookupLocation.UNSORTED) if (name == OperatorConventions.INVOKE) { // Create synthesized "invoke" extensions for each non-extension "invoke" found in the scope @@ -161,7 +161,7 @@ private object VariableCollector : CallableDescriptorCollector} // and if we find the class by name only, we may b-not get the right one. // This call is only needed to make sure the classes are written to trace - ClassifierDescriptor scopeDescriptor = resolutionScope.getClassifier(classOrObject.getNameAsSafeName(), LookupLocation.NO_LOCATION); + ClassifierDescriptor scopeDescriptor = resolutionScope.getClassifier(classOrObject.getNameAsSafeName(), NoLookupLocation.UNSORTED); DeclarationDescriptor descriptor = getBindingContext().get(BindingContext.DECLARATION_TO_DESCRIPTOR, classOrObject); if (descriptor == null) { @@ -134,7 +134,7 @@ public class LazyDeclarationResolver { @Override public DeclarationDescriptor visitNamedFunction(@NotNull JetNamedFunction function, Void data) { JetScope scopeForDeclaration = resolutionScopeToResolveDeclaration(function); - scopeForDeclaration.getFunctions(function.getNameAsSafeName(), LookupLocation.NO_LOCATION); + scopeForDeclaration.getFunctions(function.getNameAsSafeName(), NoLookupLocation.UNSORTED); return getBindingContext().get(BindingContext.DECLARATION_TO_DESCRIPTOR, function); } @@ -146,7 +146,7 @@ public class LazyDeclarationResolver { // This is a primary constructor parameter ClassDescriptor classDescriptor = getClassDescriptor(jetClass); if (parameter.hasValOrVar()) { - classDescriptor.getDefaultType().getMemberScope().getProperties(parameter.getNameAsSafeName(), LookupLocation.NO_LOCATION); + classDescriptor.getDefaultType().getMemberScope().getProperties(parameter.getNameAsSafeName(), NoLookupLocation.UNSORTED); return getBindingContext().get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, parameter); } else { @@ -189,7 +189,7 @@ public class LazyDeclarationResolver { @Override public DeclarationDescriptor visitProperty(@NotNull JetProperty property, Void data) { JetScope scopeForDeclaration = resolutionScopeToResolveDeclaration(property); - scopeForDeclaration.getProperties(property.getNameAsSafeName(), LookupLocation.NO_LOCATION); + scopeForDeclaration.getProperties(property.getNameAsSafeName(), NoLookupLocation.UNSORTED); return getBindingContext().get(BindingContext.DECLARATION_TO_DESCRIPTOR, property); } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/ResolveSessionUtils.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/ResolveSessionUtils.java index ea12c185dfb..b9ecac7bc50 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/ResolveSessionUtils.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/ResolveSessionUtils.java @@ -24,6 +24,7 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor; import org.jetbrains.kotlin.descriptors.ClassifierDescriptor; import org.jetbrains.kotlin.descriptors.ModuleDescriptor; import org.jetbrains.kotlin.descriptors.PackageViewDescriptor; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.name.FqName; import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.name.NamePackage; @@ -31,7 +32,6 @@ import org.jetbrains.kotlin.name.SpecialNames; import org.jetbrains.kotlin.psi.JetNamedDeclaration; import org.jetbrains.kotlin.psi.JetNamedDeclarationUtil; import org.jetbrains.kotlin.resolve.scopes.JetScope; -import org.jetbrains.kotlin.incremental.components.LookupLocation; import java.util.ArrayList; import java.util.Collection; @@ -84,7 +84,7 @@ public class ResolveSessionUtils { JetScope scope = outerScope; for (Name name : path.pathSegments()) { - ClassifierDescriptor classifier = scope.getClassifier(name, LookupLocation.NO_LOCATION); + ClassifierDescriptor classifier = scope.getClassifier(name, NoLookupLocation.UNSORTED); if (!(classifier instanceof ClassDescriptor)) return null; scope = ((ClassDescriptor) classifier).getUnsubstitutedInnerClassesScope(); } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java index ca2a3f14f23..7d6f98f7dd2 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java @@ -33,7 +33,7 @@ import org.jetbrains.kotlin.builtins.KotlinBuiltIns; import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.Annotations; import org.jetbrains.kotlin.descriptors.impl.ClassDescriptorBase; -import org.jetbrains.kotlin.incremental.components.LookupLocation; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.psi.*; import org.jetbrains.kotlin.resolve.*; @@ -58,7 +58,8 @@ import org.jetbrains.kotlin.types.TypeUtils; import java.util.*; import static kotlin.KotlinPackage.firstOrNull; -import static org.jetbrains.kotlin.diagnostics.Errors.*; +import static org.jetbrains.kotlin.diagnostics.Errors.CYCLIC_INHERITANCE_HIERARCHY; +import static org.jetbrains.kotlin.diagnostics.Errors.TYPE_PARAMETERS_IN_ENUM; import static org.jetbrains.kotlin.resolve.BindingContext.TYPE; import static org.jetbrains.kotlin.resolve.ModifiersChecker.*; import static org.jetbrains.kotlin.resolve.source.SourcePackage.toSourceElement; @@ -370,7 +371,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes } Name name = ((JetClassOrObjectInfo) companionObjectInfo).getName(); assert name != null; - getUnsubstitutedMemberScope().getClassifier(name, LookupLocation.NO_LOCATION); + getUnsubstitutedMemberScope().getClassifier(name, NoLookupLocation.UNSORTED); ClassDescriptor companionObjectDescriptor = c.getTrace().get(BindingContext.CLASS, companionObject); if (companionObjectDescriptor instanceof LazyClassDescriptor) { assert DescriptorUtils.isCompanionObject(companionObjectDescriptor) : "Not a companion object: " + companionObjectDescriptor; diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java index d73cd7e3347..43f98c87c97 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java @@ -23,10 +23,14 @@ import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.Annotations; import org.jetbrains.kotlin.incremental.components.LookupLocation; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.resolve.DescriptorFactory; import org.jetbrains.kotlin.resolve.OverridingUtil; -import org.jetbrains.kotlin.resolve.scopes.*; +import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter; +import org.jetbrains.kotlin.resolve.scopes.JetScope; +import org.jetbrains.kotlin.resolve.scopes.JetScopeImpl; +import org.jetbrains.kotlin.resolve.scopes.StaticScopeForKotlinClass; import org.jetbrains.kotlin.storage.MemoizedFunctionToNotNull; import org.jetbrains.kotlin.storage.NotNullLazyValue; import org.jetbrains.kotlin.storage.StorageManager; @@ -200,7 +204,7 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase { @NotNull @SuppressWarnings("unchecked") private Collection computeProperties(@NotNull Name name) { - return resolveFakeOverrides(name, (Collection) getSupertypeScope().getProperties(name, LookupLocation.NO_LOCATION)); + return resolveFakeOverrides(name, (Collection) getSupertypeScope().getProperties(name, NoLookupLocation.UNSORTED)); } @NotNull @@ -211,7 +215,7 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase { @NotNull private Collection computeFunctions(@NotNull Name name) { - return resolveFakeOverrides(name, getSupertypeScope().getFunctions(name, LookupLocation.NO_LOCATION)); + return resolveFakeOverrides(name, getSupertypeScope().getFunctions(name, NoLookupLocation.UNSORTED)); } @NotNull @@ -267,8 +271,8 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase { private Collection computeAllDeclarations() { Collection result = new HashSet(); for (Name name : enumMemberNames.invoke()) { - result.addAll(getFunctions(name, LookupLocation.NO_LOCATION)); - result.addAll(getProperties(name, LookupLocation.NO_LOCATION)); + result.addAll(getFunctions(name, NoLookupLocation.UNSORTED)); + result.addAll(getProperties(name, NoLookupLocation.UNSORTED)); } return result; } diff --git a/core/descriptors/src/org/jetbrains/kotlin/incremental/components/LookupLocation.kt b/core/descriptors/src/org/jetbrains/kotlin/incremental/components/LookupLocation.kt index afb3bd4efab..ec51f75b8dc 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/incremental/components/LookupLocation.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/incremental/components/LookupLocation.kt @@ -17,11 +17,6 @@ package org.jetbrains.kotlin.incremental.components public interface LookupLocation { - - companion object { - @deprecated("Use more suitable constant if possible") - val NO_LOCATION = NoLookupLocation.UNSORTED - } } public enum class NoLookupLocation : LookupLocation { diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.java b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.java index 0366030598f..a1b09a54d31 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.java +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.java @@ -26,6 +26,7 @@ import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor; import org.jetbrains.kotlin.descriptors.impl.AnonymousFunctionDescriptor; import org.jetbrains.kotlin.descriptors.impl.FunctionExpressionDescriptor; import org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.name.FqName; import org.jetbrains.kotlin.name.FqNameUnsafe; import org.jetbrains.kotlin.name.Name; @@ -35,7 +36,6 @@ import org.jetbrains.kotlin.resolve.constants.StringValue; import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter; import org.jetbrains.kotlin.resolve.scopes.FilteringScope; import org.jetbrains.kotlin.resolve.scopes.JetScope; -import org.jetbrains.kotlin.incremental.components.LookupLocation; import org.jetbrains.kotlin.types.ErrorUtils; import org.jetbrains.kotlin.types.JetType; import org.jetbrains.kotlin.types.LazyType; @@ -393,7 +393,7 @@ public class DescriptorUtils { @Nullable public static ClassDescriptor getInnerClassByName(@NotNull ClassDescriptor classDescriptor, @NotNull String innerClassName) { ClassifierDescriptor classifier = - classDescriptor.getDefaultType().getMemberScope().getClassifier(Name.identifier(innerClassName), LookupLocation.NO_LOCATION); + classDescriptor.getDefaultType().getMemberScope().getClassifier(Name.identifier(innerClassName), NoLookupLocation.UNSORTED); assert classifier instanceof ClassDescriptor : "Inner class " + innerClassName + " in " + classDescriptor + " should be instance of ClassDescriptor, but was: " + (classifier == null ? "null" : classifier.getClass()); diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/JetScope.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/JetScope.kt index f446de1871b..5db4cbb4ec5 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/JetScope.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/JetScope.kt @@ -18,6 +18,7 @@ package org.jetbrains.kotlin.resolve.scopes import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.incremental.components.LookupLocation +import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.types.JetType import org.jetbrains.kotlin.utils.Printer @@ -47,12 +48,12 @@ public interface JetScope { public fun getDeclarationsByLabel(labelName: Name): Collection // Temporary overloads which will be dropped when all usages will be processed - @deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, LookupLocation.NO_LOCATION)")) - public final fun getClassifier(name: Name): ClassifierDescriptor? = getClassifier(name, LookupLocation.NO_LOCATION) - @deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, LookupLocation.NO_LOCATION)")) - public final fun getProperties(name: Name): Collection = getProperties(name, LookupLocation.NO_LOCATION) - @deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, LookupLocation.NO_LOCATION)")) - public final fun getFunctions(name: Name): Collection = getFunctions(name, LookupLocation.NO_LOCATION) + @deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, NoLookupLocation.UNSORTED)")) + public final fun getClassifier(name: Name): ClassifierDescriptor? = getClassifier(name, NoLookupLocation.UNSORTED) + @deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, NoLookupLocation.UNSORTED)")) + public final fun getProperties(name: Name): Collection = getProperties(name, NoLookupLocation.UNSORTED) + @deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, NoLookupLocation.UNSORTED)")) + public final fun getFunctions(name: Name): Collection = getFunctions(name, NoLookupLocation.UNSORTED) /** * All visible descriptors from current scope. diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java index d59fec0f0df..58a90ba9039 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java +++ b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java @@ -23,10 +23,11 @@ import org.jetbrains.kotlin.builtins.KotlinBuiltIns; import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.Annotations; import org.jetbrains.kotlin.descriptors.impl.*; +import org.jetbrains.kotlin.incremental.components.LookupLocation; +import org.jetbrains.kotlin.incremental.components.NoLookupLocation; import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter; import org.jetbrains.kotlin.resolve.scopes.JetScope; -import org.jetbrains.kotlin.incremental.components.LookupLocation; import org.jetbrains.kotlin.storage.LockBasedStorageManager; import org.jetbrains.kotlin.types.error.ErrorSimpleFunctionDescriptorImpl; import org.jetbrains.kotlin.utils.Printer; @@ -77,19 +78,19 @@ public class ErrorUtils { @Nullable @Override public ClassifierDescriptor getClassifier(@NotNull Name name) { - return getClassifier(name, LookupLocation.NO_LOCATION); + return getClassifier(name, NoLookupLocation.UNSORTED); } @NotNull @Override public Collection getProperties(@NotNull Name name) { - return getProperties(name, LookupLocation.NO_LOCATION); + return getProperties(name, NoLookupLocation.UNSORTED); } @NotNull @Override public Collection getFunctions(@NotNull Name name) { - return getFunctions(name, LookupLocation.NO_LOCATION); + return getFunctions(name, NoLookupLocation.UNSORTED); } }