Commit eb32ba3
[ty] Fix 'too many cycle iterations' for unions of literals (astral-sh#20137)
## Summary
Decrease the maximum number of literals in a union before we collapse to
the supertype. The better fix for this will be
astral-sh/ty#957, but it is very tempting to
solve this for now by simply decreasing the limit by one, to get below
the salsa limit of 200.
closes astral-sh/ty#660
## Test Plan
Added a regression test that would previously lead to a "too many cycle
iterations" panic.1 parent b0856d6 commit eb32ba3
File tree
2 files changed
+18
-1
lines changed- crates/ty_python_semantic
- resources/mdtest
- src/types
2 files changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2309 | 2309 | | |
2310 | 2310 | | |
2311 | 2311 | | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
2312 | 2326 | | |
2313 | 2327 | | |
2314 | 2328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
0 commit comments