Add a couple of covariant necessary overrides

They become unavoidable after checking override conflicts
for delegation members
This commit is contained in:
Denis Zharkov
2016-09-26 10:41:46 +03:00
parent c884cffeea
commit 567b0cc8ea
2 changed files with 9 additions and 1 deletions
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.classValueType
import org.jetbrains.kotlin.resolve.descriptorUtil.getClassObjectReferenceTarget
import org.jetbrains.kotlin.resolve.descriptorUtil.hasClassValueDescriptor
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.TypeSubstitutor
import java.util.*
open class FakeCallableDescriptorForObject(
@@ -69,4 +70,7 @@ open class FakeCallableDescriptorForObject(
override fun equals(other: Any?) = other is FakeCallableDescriptorForObject && classDescriptor == other.classDescriptor
override fun hashCode() = classDescriptor.hashCode()
override fun getContainingDeclaration() = classDescriptor.getClassObjectReferenceTarget().containingDeclaration
override fun substitute(substitutor: TypeSubstitutor) = TODO("Substitution of FakeCallableDescriptorForObject is not supported")
}
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.resolve.scopes
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.descriptors.PackageViewDescriptor
import org.jetbrains.kotlin.descriptors.impl.SubpackagesScope
import org.jetbrains.kotlin.incremental.components.LookupLocation
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.utils.Printer
@@ -32,4 +33,7 @@ class SubpackagesImportingScope(
override fun getContributedPackage(name: Name): PackageViewDescriptor? = getPackage(name)
override fun printStructure(p: Printer) = printScopeStructure(p)
}
override fun getContributedVariables(name: Name, location: LookupLocation) = super.getContributedVariables(name, location)
override fun getContributedFunctions(name: Name, location: LookupLocation) = super.getContributedFunctions(name, location)
}