facebook / facebook/pyrefly

`unreachable` doesn't work with `if` statements

Open
#3,689 1 comment 1 reaction 2 assignees Claimed by @connernilsen View on GitHub
typechecking
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

```python
if False:
print("unreachable") # no error
```

### Sandbox Link

https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSIEYABAGKpRwyIA661H1xAThOgC4AKFiACu6bjFQBjABapssEQEoQAGhBlJYKKUL9cAWygUy-WbnQBaAG4xucCJeoBeaiIDMhAIwAWEWw88DD8ru4gcPy80vwB6ADa9ty4DgC6bJgwQdKo-DCYYSJJKSLu6BCGxFAQ0hD8VgqR3DL10lCocHCFIMXccRVVNXVWAymhbkXcyX0gZQPVtfy6VpmQ6PkN-FEQ2KJ53b1xhhCdfADmVnC4otzSMAdTJSBs6JZWMPjyopEQdlaGuTkD2mcVe9UkAEdRBBJJgrABrGCkBrSO6dYFPNi4YgwaziYgyeHnDEzMqw8SYDCtDrjcKHWZsclYKlWaSWTB1JzsCY9R6ktjidZotDcZFsyqoXhXbl0vmlAXoIXwEXI-ikHGsyx2Bxckny9DiSQyeSKe48%2BllQ1SOQKWD-QGyVkdM2ykEMg0SeC4KA2W0wFYU%2BwNKBQPXu8RqnFw0bcWmTN2Wg1MaNnV6SMNlX28DB3f4nAH8IHmuXuvi%2B6pwzJs5oGbhhkAAXw0LV%2BMFo0BgFDQWDwRDIjaAA

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.