diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatedPropertyResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatedPropertyResolver.kt index 400f04aec82..3352bc976fc 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatedPropertyResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatedPropertyResolver.kt @@ -575,8 +575,6 @@ class DelegatedPropertyResolver( } private object AnonymousTypeSubstitutor : NewTypeSubstitutor { - override val isEmpty get() = true - override fun substituteNotNullTypeWithConstructor(constructor: TypeConstructor): UnwrappedType? { val declarationDescriptor = constructor.declarationDescriptor if (declarationDescriptor is ClassifierDescriptor && DescriptorUtils.isAnonymousObject(declarationDescriptor)) { diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt index 6d4d21a7d1c..0d24da87257 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt @@ -25,7 +25,6 @@ import org.jetbrains.kotlin.types.checker.intersectTypes interface NewTypeSubstitutor { fun substituteNotNullTypeWithConstructor(constructor: TypeConstructor): UnwrappedType? - val isEmpty: Boolean fun safeSubstitute(type: UnwrappedType): UnwrappedType = substitute(type) ?: type @@ -136,13 +135,10 @@ interface NewTypeSubstitutor { } class NewTypeSubstitutorByConstructorMap(val map: Map) : NewTypeSubstitutor { - override val isEmpty get() = map.isEmpty() override fun substituteNotNullTypeWithConstructor(constructor: TypeConstructor): UnwrappedType? = map[constructor] } class FreshVariableNewTypeSubstitutor(val freshVariables: List) : NewTypeSubstitutor { - override val isEmpty get() = freshVariables.isEmpty() - override fun substituteNotNullTypeWithConstructor(constructor: TypeConstructor): UnwrappedType? { val indexProposal = (constructor.declarationDescriptor as? TypeParameterDescriptor)?.index ?: return null val typeVariable = freshVariables.getOrNull(indexProposal) ?: return null