[FIR2IR] Count IrErrorTypes as not equal for purpose of overriding

This prevents possible type checking exceptions
This commit is contained in:
Mikhail Glukhikh
2020-06-17 17:53:33 +03:00
parent d02d423d45
commit 6d07af63cf
@@ -381,6 +381,7 @@ fun isOverriding(
): Boolean {
val typeCheckerContext = IrTypeCheckerContext(irBuiltIns) as AbstractTypeCheckerContext
fun equalTypes(first: IrType, second: IrType): Boolean {
if (first is IrErrorType || second is IrErrorType) return false
return AbstractTypeChecker.equalTypes(
typeCheckerContext, first, second
) ||