Known unreachable code in a function after a return should throw an error on --strict
Open
modification
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
e.g.:
```python
def func():
do_stuff()
return x
do_more_stuff()
```
Contributor guide
Research direction
Start by locating Coconut's handling of function bodies and the --strict validation path; the issue provides a minimal example with a statement after return. Add coverage for that example and verify that strict mode rejects the unreachable code while non-strict mode preserves its existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100