Temporary fix for problem with ownerDescriptor in ImportingScope

This commit is contained in:
Valentin Kipyatkov
2015-10-26 14:49:56 +03:00
parent 03f18e1ac1
commit a5982281af
3 changed files with 6 additions and 3 deletions
@@ -22,7 +22,10 @@ import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.utils.Printer
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
public class ExplicitImportsScope(private val descriptors: Collection<DeclarationDescriptor>) : ImportingScope by ImportingScope.Empty {
public class ExplicitImportsScope(
private val descriptors: Collection<DeclarationDescriptor>,
override val ownerDescriptor: DeclarationDescriptor //TODO: temporary?
) : ImportingScope by ImportingScope.Empty {
override fun getContributedClassifier(name: Name, location: LookupLocation)
= descriptors.filter { it.getName() == name }.firstIsInstanceOrNull<ClassifierDescriptor>()