diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index 6a5d48866158..838754d13299 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -353,7 +353,8 @@ object Types { * */ def isErroneous(using Context): Boolean = - widen.existsPart(_.isError, forceLazy = false) + try widen.existsPart(_.isError, forceLazy = false) + catch case ex: TypeError => true /** Is this type unusable for implicit search or overloading resolution * since it has embedded errors that can match anything? This is weaker and more