Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorType instead of throwing in match type "no cases" #18016

Merged
merged 1 commit into from
Jun 24, 2023

Commits on Jun 24, 2023

  1. ErrorType instead of throwing in match type "no cases"

    Instead of throwing MatchTypeReductionError, return
    ErrorType(MatchTypeNoCases), which is a proper message as well.
    
    This avoids having to catch and ignore it as an exception.  But it does
    require discovering it from type simplification and reporting it then -
    which replaces its reliance on catching TypeErrors.
    
    It also required handling scrutinees that are error types, which
    previously would always match the first case, due to FlexType semantics.
    dwijnand committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    9ae1598 View commit details
    Browse the repository at this point in the history