Skip to content

Restore unreachable warnings by converting literals #13289

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

Closed
wants to merge 1 commit into from

Conversation

dwijnand
Copy link
Member

The fix implemented to deal with primitive types auto-converting was
suppressing a series of legitimate unreachable warnings. So we removed
that fixed and tried to mirror the auto-conversion of the type, such
that the space intersection calculation ends up with the correct
results.

In doing so we triggered reachability warnings being emitted by
sealed trait companion object (or enum) ordinal synthetic methods, in
some weird test cases. So we added an @unchecked annotation to
suppress those.

Fixes #12805

The fix implemented to deal with primitive types auto-converting was
suppressing a series of legitimate unreachable warnings.  So we removed
that fixed and tried to mirror the auto-conversion of the type, such
that the space intersection calculation ends up with the correct
results.

In doing so we triggered reachability warnings being emitted by
sealed trait companion object (or enum) `ordinal` synthetic methods, in
some weird test cases.  So we added an `@unchecked` annotation to
suppress those.

Co-authored-by: Seth Tisue <[email protected]>
@dwijnand
Copy link
Member Author

Wrong branch.

@dwijnand dwijnand closed this Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unions of Singletons unreachable literals not being checked in pattern match.
1 participant