From 547704c179496cc5424b8642e4d1414c62b66845 Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Thu, 15 Dec 2016 11:14:22 +0100 Subject: [PATCH] 'SubpackagesImportingScope' class update due to new diagnostic --- .../resolve/scopes/SubpackagesImportingScope.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/SubpackagesImportingScope.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/SubpackagesImportingScope.kt index ddb45268033..9165e9aaac4 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/SubpackagesImportingScope.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/SubpackagesImportingScope.kt @@ -16,6 +16,8 @@ package org.jetbrains.kotlin.resolve.scopes +import org.jetbrains.kotlin.descriptors.ClassifierDescriptor +import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.PackageViewDescriptor import org.jetbrains.kotlin.descriptors.impl.SubpackagesScope @@ -36,4 +38,14 @@ class SubpackagesImportingScope( override fun getContributedVariables(name: Name, location: LookupLocation) = super.getContributedVariables(name, location) override fun getContributedFunctions(name: Name, location: LookupLocation) = super.getContributedFunctions(name, location) + + //TODO: kept old behavior, but it seems very strange (super call seems more applicable) + override fun getContributedClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? { + return ImportingScope.Empty.getContributedClassifier(name, location) + } + + //TODO: kept old behavior, but it seems very strange (super call seems more applicable) + override fun getContributedDescriptors(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean): Collection { + return ImportingScope.Empty.getContributedDescriptors(kindFilter, nameFilter) + } }