You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid crash when superType does not exist after erasure (#20188)
Fixes#19929
Two main changes:
- In TypeErasure, throw a TypeError instead of a FatalError if a
supertype of an applied type does not exist. That way, we get a proper
error with a position.
- Move some catch-and-rethrow logic from ReTyper to TreeChecker. ReTyper
already had special exceptions that disabled the logic for all uses of
ReTyper except TreeChecker. Unfortunately the ReTyper override also
disabled the special TypeError handling in Typer.
The root cause of #19929 got fixed by another PR, but I think it's still
good to do the hardening of this commit.
0 commit comments