Commit 1896ffe
Handle
Summary:
We can statically evaluate `sys.version_info >= (3, 12)` and `sys.version_info[1] >= 10`, but not `sys.version_info.minor >= 10` (named attribute access).
This caused Pysa crashes when using Pyrefly as the type checker backend: Pyrefly would report function definitions from dead branches as reachable callables, but Pyre's preprocessing (which handles `.minor`) would remove them, leading to an unmatched callable error in `pyreflyApi.ml`.
Reviewed By: yangdanny97
Differential Revision: D105690953
fbshipit-source-id: 3151823eb3d81e07292887d111274bfd6821fd46sys.version_info.minor in static evaluation1 parent d6c88a5 commit 1896ffe
2 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
557 | 566 | | |
558 | 567 | | |
559 | 568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| |||
0 commit comments