diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/dynamicCalls.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/dynamicCalls.kt index eae59af6bf7..ec3f3d210fc 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/dynamicCalls.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/dynamicCalls.kt @@ -28,7 +28,6 @@ import org.jetbrains.kotlin.resolve.DescriptorFactory import org.jetbrains.kotlin.resolve.calls.tasks.collectors.CallableDescriptorCollector import org.jetbrains.kotlin.resolve.calls.tasks.collectors.CallableDescriptorCollectors import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns -import org.jetbrains.kotlin.resolve.scopes.KtScope import org.jetbrains.kotlin.resolve.scopes.KtScopeImpl import org.jetbrains.kotlin.resolve.scopes.LexicalScope import org.jetbrains.kotlin.resolve.scopes.receivers.TransientReceiver diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt index efda8105e7c..9cc3cfc0e74 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt @@ -19,14 +19,16 @@ package org.jetbrains.kotlin.load.java.lazy.descriptors 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.descriptors.impl.ConstructorDescriptorImpl +import org.jetbrains.kotlin.descriptors.impl.EnumEntrySyntheticClassDescriptor +import org.jetbrains.kotlin.descriptors.impl.ValueParameterDescriptorImpl import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.load.java.* -import org.jetbrains.kotlin.load.java.BuiltinSpecialProperties.getBuiltinSpecialPropertyGetterName -import org.jetbrains.kotlin.load.java.BuiltinMethodsWithDifferentJvmName.sameAsRenamedInJvmBuiltin import org.jetbrains.kotlin.load.java.BuiltinMethodsWithDifferentJvmName.isRemoveAtByIndex +import org.jetbrains.kotlin.load.java.BuiltinMethodsWithDifferentJvmName.sameAsRenamedInJvmBuiltin import org.jetbrains.kotlin.load.java.BuiltinMethodsWithSpecialGenericSignature.sameAsBuiltinMethodWithErasedValueParameters +import org.jetbrains.kotlin.load.java.BuiltinSpecialProperties.getBuiltinSpecialPropertyGetterName import org.jetbrains.kotlin.load.java.components.DescriptorResolverUtils import org.jetbrains.kotlin.load.java.components.TypeUsage import org.jetbrains.kotlin.load.java.descriptors.JavaConstructorDescriptor @@ -38,7 +40,6 @@ import org.jetbrains.kotlin.load.java.lazy.child import org.jetbrains.kotlin.load.java.lazy.resolveAnnotations import org.jetbrains.kotlin.load.java.lazy.types.RawSubstitution import org.jetbrains.kotlin.load.java.lazy.types.toAttributes -import org.jetbrains.kotlin.load.java.sources.JavaSourceElement import org.jetbrains.kotlin.load.java.structure.JavaArrayType import org.jetbrains.kotlin.load.java.structure.JavaClass import org.jetbrains.kotlin.load.java.structure.JavaConstructor @@ -630,10 +631,6 @@ public class LazyJavaClassMemberScope( } } - // TODO - override fun getImplicitReceiversHierarchy(): List = listOf() - - override fun getContainingDeclaration() = super.getContainingDeclaration() as ClassDescriptor // namespaces should be resolved elsewhere diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaStaticScope.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaStaticScope.kt index d9522fafdfb..f1925e07977 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaStaticScope.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaStaticScope.kt @@ -18,7 +18,6 @@ package org.jetbrains.kotlin.load.java.lazy.descriptors import org.jetbrains.kotlin.descriptors.ClassOrPackageFragmentDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor -import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor import org.jetbrains.kotlin.load.java.lazy.LazyJavaResolverContext import org.jetbrains.kotlin.load.java.structure.JavaMethod @@ -37,8 +36,6 @@ public abstract class LazyJavaStaticScope( override fun getPackage(name: Name) = null abstract fun getSubPackages(): Collection - override fun getImplicitReceiversHierarchy(): List = listOf() - override fun resolveMethodSignature( method: JavaMethod, methodTypeParameters: List, returnType: KotlinType, valueParameters: LazyJavaScope.ResolvedValueParameters diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/AbstractScopeAdapter.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/AbstractScopeAdapter.kt index 19ca372ab8a..c9c14a05b51 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/AbstractScopeAdapter.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/AbstractScopeAdapter.kt @@ -19,7 +19,6 @@ package org.jetbrains.kotlin.resolve.scopes import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.utils.Printer /** @@ -34,10 +33,6 @@ public abstract class AbstractScopeAdapter : KtScope { else workerScope - override fun getImplicitReceiversHierarchy(): List { - return workerScope.getImplicitReceiversHierarchy() - } - override fun getFunctions(name: Name, location: LookupLocation): Collection { return workerScope.getFunctions(name, location) } @@ -54,34 +49,10 @@ public abstract class AbstractScopeAdapter : KtScope { return workerScope.getProperties(name, location) } - override fun getSyntheticExtensionProperties(receiverTypes: Collection, name: Name, location: LookupLocation): Collection { - return workerScope.getSyntheticExtensionProperties(receiverTypes, name, location) - } - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection, name: Name, location: LookupLocation): Collection { - return workerScope.getSyntheticExtensionFunctions(receiverTypes, name, location) - } - - override fun getSyntheticExtensionProperties(receiverTypes: Collection): Collection { - return workerScope.getSyntheticExtensionProperties(receiverTypes) - } - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection): Collection { - return workerScope.getSyntheticExtensionFunctions(receiverTypes) - } - - override fun getLocalVariable(name: Name): VariableDescriptor? { - return workerScope.getLocalVariable(name) - } - override fun getContainingDeclaration(): DeclarationDescriptor { return workerScope.getContainingDeclaration() } - override fun getDeclarationsByLabel(labelName: Name): Collection { - return workerScope.getDeclarationsByLabel(labelName) - } - override fun getDescriptors(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean): Collection { return workerScope.getDescriptors(kindFilter, nameFilter) diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/ChainedScope.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/ChainedScope.kt index 050756d1691..6c8e2f83ea5 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/ChainedScope.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/ChainedScope.kt @@ -19,11 +19,9 @@ package org.jetbrains.kotlin.resolve.scopes import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.util.collectionUtils.getFirstMatch import org.jetbrains.kotlin.util.collectionUtils.getFromAllScopes import org.jetbrains.kotlin.utils.Printer -import java.util.ArrayList public open class ChainedScope( private val containingDeclaration: DeclarationDescriptor?/* it's nullable as a hack for TypeUtils.intersect() */, @@ -31,7 +29,6 @@ public open class ChainedScope( vararg scopes: KtScope ) : KtScope { private val scopeChain = scopes.clone() - private var implicitReceiverHierarchy: List? = null override fun getClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? = getFirstMatch(scopeChain) { it.getClassifier(name, location) } @@ -42,38 +39,11 @@ public open class ChainedScope( override fun getProperties(name: Name, location: LookupLocation): Collection = getFromAllScopes(scopeChain) { it.getProperties(name, location) } - override fun getLocalVariable(name: Name): VariableDescriptor? - = getFirstMatch(scopeChain) { it.getLocalVariable(name) } - override fun getFunctions(name: Name, location: LookupLocation): Collection = getFromAllScopes(scopeChain) { it.getFunctions(name, location) } - override fun getSyntheticExtensionProperties(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - = getFromAllScopes(scopeChain) { it.getSyntheticExtensionProperties(receiverTypes, name, location) } - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - = getFromAllScopes(scopeChain) { it.getSyntheticExtensionFunctions(receiverTypes, name, location) } - - override fun getSyntheticExtensionProperties(receiverTypes: Collection): Collection - = getFromAllScopes(scopeChain) { it.getSyntheticExtensionProperties(receiverTypes) } - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection): Collection - = getFromAllScopes(scopeChain) { it.getSyntheticExtensionFunctions(receiverTypes) } - - override fun getImplicitReceiversHierarchy(): List { - if (implicitReceiverHierarchy == null) { - val result = ArrayList() - scopeChain.flatMapTo(result) { it.getImplicitReceiversHierarchy() } - result.trimToSize() - implicitReceiverHierarchy = result - } - return implicitReceiverHierarchy!! - } - override fun getContainingDeclaration(): DeclarationDescriptor = containingDeclaration!! - override fun getDeclarationsByLabel(labelName: Name) = scopeChain.flatMap { it.getDeclarationsByLabel(labelName) } - override fun getDescriptors(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean) = getFromAllScopes(scopeChain) { it.getDescriptors(kindFilter, nameFilter) } diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/FilteringScope.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/FilteringScope.kt index a210b6e0504..8cf152027db 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/FilteringScope.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/FilteringScope.kt @@ -17,11 +17,8 @@ package org.jetbrains.kotlin.resolve.scopes import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.FunctionDescriptor -import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.utils.Printer public class FilteringScope(private val workerScope: KtScope, private val predicate: (DeclarationDescriptor) -> Boolean) : KtScope { @@ -39,27 +36,9 @@ public class FilteringScope(private val workerScope: KtScope, private val predic override fun getProperties(name: Name, location: LookupLocation) = workerScope.getProperties(name, location).filter(predicate) - override fun getSyntheticExtensionProperties(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - = workerScope.getSyntheticExtensionProperties(receiverTypes, name, location).filter(predicate) - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - = workerScope.getSyntheticExtensionFunctions(receiverTypes, name, location).filter(predicate) - - override fun getSyntheticExtensionProperties(receiverTypes: Collection): Collection - = workerScope.getSyntheticExtensionProperties(receiverTypes).filter(predicate) - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection): Collection - = workerScope.getSyntheticExtensionFunctions(receiverTypes).filter(predicate) - - override fun getLocalVariable(name: Name) = filterDescriptor(workerScope.getLocalVariable(name)) - override fun getDescriptors(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean) = workerScope.getDescriptors(kindFilter, nameFilter).filter(predicate) - override fun getImplicitReceiversHierarchy() = workerScope.getImplicitReceiversHierarchy() - - override fun getDeclarationsByLabel(labelName: Name) = workerScope.getDeclarationsByLabel(labelName).filter(predicate) - override fun getOwnDeclaredDescriptors() = workerScope.getOwnDeclaredDescriptors().filter(predicate) override fun printScopeStructure(p: Printer) { diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScope.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScope.kt index 9358183c8f0..c67f88c5e50 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScope.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScope.kt @@ -19,7 +19,6 @@ package org.jetbrains.kotlin.resolve.scopes import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.utils.Printer import org.jetbrains.kotlin.utils.toReadOnlyList import java.lang.reflect.Modifier @@ -28,24 +27,15 @@ public interface KtScope { public fun getClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? + @Deprecated("Should be removed soon") public fun getPackage(name: Name): PackageViewDescriptor? public fun getProperties(name: Name, location: LookupLocation): Collection - public fun getLocalVariable(name: Name): VariableDescriptor? - public fun getFunctions(name: Name, location: LookupLocation): Collection - public fun getSyntheticExtensionProperties(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - public fun getSyntheticExtensionFunctions(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - - public fun getSyntheticExtensionProperties(receiverTypes: Collection): Collection - public fun getSyntheticExtensionFunctions(receiverTypes: Collection): Collection - public fun getContainingDeclaration(): DeclarationDescriptor - public fun getDeclarationsByLabel(labelName: Name): Collection - /** * All visible descriptors from current scope. * @@ -62,11 +52,7 @@ public interface KtScope { nameFilter: (Name) -> Boolean = ALL_NAME_FILTER ): Collection - /** - * Adds receivers to the list in order of locality, so that the closest (the most local) receiver goes first - */ - public fun getImplicitReceiversHierarchy(): List - + // todo merge with getAllDescriptors() public fun getOwnDeclaredDescriptors(): Collection /** diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScopeImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScopeImpl.kt index 2c3ae58325a..b8a366a50b1 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScopeImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/KtScopeImpl.kt @@ -19,7 +19,6 @@ package org.jetbrains.kotlin.resolve.scopes import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.utils.Printer abstract class KtScopeImpl : KtScope { @@ -27,25 +26,13 @@ abstract class KtScopeImpl : KtScope { override fun getProperties(name: Name, location: LookupLocation): Collection = emptyList() - override fun getLocalVariable(name: Name): VariableDescriptor? = null - override fun getPackage(name: Name): PackageViewDescriptor? = null override fun getFunctions(name: Name, location: LookupLocation): Collection = emptyList() - override fun getSyntheticExtensionProperties(receiverTypes: Collection, name: Name, location: LookupLocation): Collection = emptyList() - override fun getSyntheticExtensionFunctions(receiverTypes: Collection, name: Name, location: LookupLocation): Collection = emptyList() - - override fun getSyntheticExtensionProperties(receiverTypes: Collection): Collection = emptyList() - override fun getSyntheticExtensionFunctions(receiverTypes: Collection): Collection = emptyList() - - override fun getDeclarationsByLabel(labelName: Name): Collection = emptyList() - override fun getDescriptors(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean): Collection = emptyList() - override fun getImplicitReceiversHierarchy(): List = emptyList() - override fun getOwnDeclaredDescriptors(): Collection = emptyList() // This method should not be implemented here by default: every scope class has its unique structure pattern diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/SubstitutingScope.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/SubstitutingScope.kt index 2f2c146d4ea..52d402f4f4e 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/SubstitutingScope.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/scopes/SubstitutingScope.kt @@ -17,16 +17,12 @@ package org.jetbrains.kotlin.resolve.scopes import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.FunctionDescriptor -import org.jetbrains.kotlin.descriptors.PropertyDescriptor -import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.TypeSubstitutor import org.jetbrains.kotlin.utils.Printer import org.jetbrains.kotlin.utils.newHashSetWithExpectedSize -import java.util.HashMap +import java.util.* public class SubstitutingScope(private val workerScope: KtScope, private val substitutor: TypeSubstitutor) : KtScope { @@ -65,36 +61,14 @@ public class SubstitutingScope(private val workerScope: KtScope, private val sub override fun getProperties(name: Name, location: LookupLocation) = substitute(workerScope.getProperties(name, location)) - override fun getLocalVariable(name: Name) = substitute(workerScope.getLocalVariable(name)) - override fun getClassifier(name: Name, location: LookupLocation) = substitute(workerScope.getClassifier(name, location)) override fun getFunctions(name: Name, location: LookupLocation) = substitute(workerScope.getFunctions(name, location)) - override fun getSyntheticExtensionProperties(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - = substitute(workerScope.getSyntheticExtensionProperties(receiverTypes, name, location)) - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection, name: Name, location: LookupLocation): Collection - = substitute(workerScope.getSyntheticExtensionFunctions(receiverTypes, name, location)) - - override fun getSyntheticExtensionProperties(receiverTypes: Collection): Collection - = substitute(workerScope.getSyntheticExtensionProperties(receiverTypes)) - - override fun getSyntheticExtensionFunctions(receiverTypes: Collection): Collection - = substitute(workerScope.getSyntheticExtensionFunctions(receiverTypes)) - override fun getPackage(name: Name) = workerScope.getPackage(name) - override fun getImplicitReceiversHierarchy(): List { - throw UnsupportedOperationException() // TODO - } - override fun getContainingDeclaration() = workerScope.getContainingDeclaration() - override fun getDeclarationsByLabel(labelName: Name): Collection { - throw UnsupportedOperationException() // TODO - } - override fun getDescriptors(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean) = _allDescriptors diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java index 1dd9c55152c..9eda07eefd8 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java +++ b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java @@ -179,54 +179,11 @@ public class ErrorUtils { return ERROR_VARIABLE_GROUP; } - @NotNull - @Override - public Collection getSyntheticExtensionProperties( - @NotNull Collection receiverTypes, @NotNull Name name, - @NotNull LookupLocation location - ) { - return ERROR_PROPERTY_GROUP; - } - - @NotNull - @Override - public Collection getSyntheticExtensionFunctions( - @NotNull Collection receiverTypes, @NotNull Name name, - @NotNull LookupLocation location - ) { - return Collections.singleton(createErrorFunction(this)); - } - - @NotNull - @Override - public Collection getSyntheticExtensionProperties(@NotNull Collection receiverTypes) { - return ERROR_PROPERTY_GROUP; - } - - @NotNull - @Override - public Collection getSyntheticExtensionFunctions( - @NotNull Collection receiverTypes - ) { - return Collections.singleton(createErrorFunction(this)); - } - - @Override - public VariableDescriptor getLocalVariable(@NotNull Name name) { - return ERROR_PROPERTY; - } - @Override public PackageViewDescriptor getPackage(@NotNull Name name) { return null; } - @NotNull - @Override - public List getImplicitReceiversHierarchy() { - return Collections.emptyList(); - } - @NotNull @Override public Set getFunctions(@NotNull Name name, @NotNull LookupLocation location) { @@ -239,12 +196,6 @@ public class ErrorUtils { return ERROR_MODULE; } - @NotNull - @Override - public Collection getDeclarationsByLabel(@NotNull Name labelName) { - return Collections.emptyList(); - } - @NotNull @Override public Collection getDescriptors( @@ -301,62 +252,18 @@ public class ErrorUtils { throw new IllegalStateException(); } - @Nullable - @Override - public VariableDescriptor getLocalVariable(@NotNull Name name) { - throw new IllegalStateException(); - } - @NotNull @Override public Collection getFunctions(@NotNull Name name, @NotNull LookupLocation location) { throw new IllegalStateException(); } - @NotNull - @Override - public Collection getSyntheticExtensionProperties( - @NotNull Collection receiverTypes, @NotNull Name name, - @NotNull LookupLocation location - ) { - throw new IllegalStateException(); - } - - @NotNull - @Override - public Collection getSyntheticExtensionFunctions( - @NotNull Collection receiverTypes, @NotNull Name name, - @NotNull LookupLocation location - ) { - throw new IllegalStateException(); - } - - @NotNull - @Override - public Collection getSyntheticExtensionProperties(@NotNull Collection receiverTypes) { - throw new IllegalStateException(); - } - - @NotNull - @Override - public Collection getSyntheticExtensionFunctions( - @NotNull Collection receiverTypes - ) { - throw new IllegalStateException(); - } - @NotNull @Override public DeclarationDescriptor getContainingDeclaration() { return ERROR_MODULE; } - @NotNull - @Override - public Collection getDeclarationsByLabel(@NotNull Name labelName) { - throw new IllegalStateException(); - } - @NotNull @Override public Collection getDescriptors( @@ -371,12 +278,6 @@ public class ErrorUtils { throw new IllegalStateException(); } - @NotNull - @Override - public List getImplicitReceiversHierarchy() { - throw new IllegalStateException(); - } - @NotNull @Override public Collection getOwnDeclaredDescriptors() { @@ -461,7 +362,6 @@ public class ErrorUtils { private static final PropertyDescriptor ERROR_PROPERTY = createErrorProperty(); private static final Set ERROR_VARIABLE_GROUP = Collections.singleton(ERROR_PROPERTY); - private static final Set ERROR_PROPERTY_GROUP = Collections.singleton(ERROR_PROPERTY); @NotNull private static PropertyDescriptorImpl createErrorProperty() { diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt index a29fb1ca709..b9bab399fd5 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt @@ -242,8 +242,6 @@ public class DeserializedClassDescriptor( } } - override fun getImplicitReceiver() = classDescriptor.getThisAsReceiverParameter() - override fun getClassDescriptor(name: Name): ClassifierDescriptor? = classDescriptor.enumEntries.findEnumEntry(name) ?: classDescriptor.nestedClasses.findNestedClass(name) diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt index 6ae67fb5645..85fdf9568c0 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt @@ -175,13 +175,6 @@ public abstract class DeserializedMemberScope protected constructor( protected abstract fun addEnumEntryDescriptors(result: MutableCollection, nameFilter: (Name) -> Boolean) - override fun getImplicitReceiversHierarchy(): List { - val receiver = getImplicitReceiver() - return if (receiver != null) listOf(receiver) else listOf() - } - - protected abstract fun getImplicitReceiver(): ReceiverParameterDescriptor? - override fun getOwnDeclaredDescriptors() = getAllDescriptors() override fun printScopeStructure(p: Printer) { diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt index 68057cefc2e..edd98b21391 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt @@ -19,7 +19,6 @@ package org.jetbrains.kotlin.serialization.deserialization.descriptors import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor -import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor import org.jetbrains.kotlin.incremental.components.LookupLocation import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.name.ClassId @@ -69,6 +68,4 @@ public open class DeserializedPackageMemberScope( override fun addEnumEntryDescriptors(result: MutableCollection, nameFilter: (Name) -> Boolean) { // Do nothing } - - override fun getImplicitReceiver(): ReceiverParameterDescriptor? = null }