Skip to content

Conversation

@BobTheBuidler
Copy link
Contributor

@BobTheBuidler BobTheBuidler commented Jan 18, 2026

  • avoid crashing when loading Final values in unreachable branches by falling back to the declared type
  • add an irbuild-unreachable regression test for Final name loads

Fixes mypyc/mypyc#1180

@BobTheBuidler BobTheBuidler changed the title Pr 19672 [mypyc] fix: Final load in unreachable branches Jan 18, 2026
@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@BobTheBuidler BobTheBuidler marked this pull request as ready for review January 18, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crash (KeyError: NameExpr) when Final constant returned under if x is None for non‑Optional param

1 participant