Detect and omit unreachable code based on type constraints.
Task
Implement thorough unreachable code detection similar to Pyright.
Requirements
- Detect code after
typing.NoReturn function calls
- Identify impossible
match/if branches based on type constraints
- Omit dead V code completely
Implementation Notes
- Pyright-inspired feature
- Reduces generated code size
- Improves compilation performance
Acceptance Criteria
Priority
Medium
Labels
enhancement, optimization, dead-code, pyright-inspired
Detect and omit unreachable code based on type constraints.
Task
Implement thorough unreachable code detection similar to Pyright.
Requirements
typing.NoReturnfunction callsmatch/ifbranches based on type constraintsImplementation Notes
Acceptance Criteria
Priority
Medium
Labels
enhancement, optimization, dead-code, pyright-inspired