Skip to content

Commit

Permalink
Merge pull request #15442 from dotty-staging/fix-15293
Browse files Browse the repository at this point in the history
Recover from TypeErrors in isErroneous
  • Loading branch information
odersky authored Jun 15, 2022
2 parents b3725e5 + 5c3ef81 commit bf026ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,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
Expand Down

0 comments on commit bf026ad

Please sign in to comment.