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

Fix unreachability test #842

Merged
merged 4 commits into from
Jul 6, 2023
Merged

Fix unreachability test #842

merged 4 commits into from
Jul 6, 2023

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Jul 6, 2023

This PR fixes two case-when typing problems.

  1. Case-when without subject may result in unexpected UnreachableBranch, when one when clause is detected always true and all of the following whens are unreachable.
  2. Case-when with untyped, top, or bool subject with equality values results in UnreachableBranch.

This PR also reverts #841 because having no-untyped is better, while bot is the exception that untyped wins over bot.

* Less `untyped` results
* `bot` is the last option
It checks the reachability of each branch based on the predicate, but previous branch reachability doesn’t matter.
@soutaro soutaro added this to the Steep 1.5 milestone Jul 6, 2023
@soutaro soutaro enabled auto-merge July 6, 2023 14:41
@soutaro soutaro merged commit 4bbe86b into master Jul 6, 2023
20 checks passed
@soutaro soutaro deleted the case-unreachable branch July 6, 2023 14:57
@soutaro soutaro added the Released The PR is already included in a published release label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released The PR is already included in a published release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant