KotlinIsland / KotlinIsland/basedmypy

Report unreachable when a sub-expression is `Never`

Open
#520 1 comment 1 reaction 0 assignees View on GitHub
feature p-0
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```py
print(exit())
print("hi") # error: unreachable
```
I would expect the first `print` to also be unreachable

Contributor guide

Open the contributing guide

Research direction

Start by running the reported Python example through basedmypy and compare the unreachable diagnostics for both print calls. Trace the checker’s unreachable-code analysis for expressions containing Never; done means the first print is also reported as unreachable while the existing diagnostic remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.