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:
@@ -35,8 +35,6 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
|
||||
|
||||
val irBuiltIns: IrBuiltIns
|
||||
|
||||
override val isErrorTypeAllowed: Boolean get() = true
|
||||
|
||||
override fun KotlinTypeMarker.asSimpleType() = this as? SimpleTypeMarker
|
||||
|
||||
override fun KotlinTypeMarker.asFlexibleType() = this as? IrDynamicType
|
||||
|
||||
@@ -70,6 +70,8 @@ fun IrType.isSubtypeOf(superType: IrType, irBuiltIns: IrBuiltIns): Boolean {
|
||||
return AbstractTypeChecker.isSubtypeOf(IrTypeCheckerContext(irBuiltIns) as AbstractTypeCheckerContext, this, superType)
|
||||
}
|
||||
|
||||
// no searchable usages
|
||||
// delete or FIXME: implement TypeConstructorMarker.isError and TypeConstructorMarker.toErrorType in IrTypeSystemContext
|
||||
fun Collection<IrType>.commonSupertype(irBuiltIns: IrBuiltIns): IrType {
|
||||
return NewCommonSuperTypeCalculator.run {
|
||||
IrTypeCheckerContext(irBuiltIns).commonSuperType(map { it }) as IrType
|
||||
|
||||
Reference in New Issue
Block a user