Drop isErrorTypeAllowed flag from type system context

The flag was used exclusively during calculation of common super type.
This change relies on assumption, that common super type is
NOT calculated in IR type system context.
This commit is contained in:
Pavel Kirpichenkov
2020-07-21 18:24:50 +03:00
parent 710659324c
commit 1ef17c6f3a
6 changed files with 6 additions and 15 deletions
@@ -33,8 +33,6 @@ import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSystemCommonBackendContext {
override val isErrorTypeAllowed: Boolean get() = false
override fun TypeConstructorMarker.isDenotable(): Boolean {
require(this is TypeConstructor, this::errorMessage)
return this.isDenotable
@@ -78,10 +78,6 @@ interface TypeCheckerProviderContext {
}
interface TypeSystemCommonSuperTypesContext : TypeSystemContext, TypeSystemTypeFactoryContext, TypeCheckerProviderContext {
/*
* If set in false then if there is an error supertype in input types list of `commonSuperType` it will be returned
*/
val isErrorTypeAllowed: Boolean
fun KotlinTypeMarker.anySuperTypeConstructor(predicate: (TypeConstructorMarker) -> Boolean) =
newBaseTypeCheckerContext(errorTypesEqualToAnything = false, stubTypesEqualToAnything = true)