Repository navigation
Commit d356a46
committed
Keep only the accessories both passes satisfy when widening a type
MutatingScope::generalizeType() intersected the widened type with every
accessory of the previous pass's type, also when the new pass's type
lacks it: `list<'x'>` widened with `array<int<0, max>, 'x'>` came back as
`list<'x'>`, which does not contain the new pass. A convergence then
walks back to the new pass's type each time, never reaches a fixpoint,
and since the by-ref closures give up at the iteration limit, their
by-ref variables became mixed - issue-bot's RunCommand::runPool() failed
its own analysis with it.
An accessory is now kept only when no type of the new pass may lack it.
Amp-Thread-ID: https://ampcode.com/threads/T-01a1976c-1bde-72f8-b96c-072279109d591 parent 1a5636a commit d356a46
3 files changed
Lines changed: 84 additions & 4 deletions
File tree
- src/Analyser
- tests/PHPStan/Analyser/nsrt
- turbo-ext/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6322 | 6322 | | |
6323 | 6323 | | |
6324 | 6324 | | |
6325 | | - | |
6326 | | - | |
6327 | | - | |
6328 | | - | |
| 6325 | + | |
| 6326 | + | |
| 6327 | + | |
| 6328 | + | |
| 6329 | + | |
| 6330 | + | |
| 6331 | + | |
| 6332 | + | |
| 6333 | + | |
| 6334 | + | |
| 6335 | + | |
| 6336 | + | |
| 6337 | + | |
| 6338 | + | |
6329 | 6339 | | |
6330 | 6340 | | |
6331 | 6341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11379 | 11379 | | |
11380 | 11380 | | |
11381 | 11381 | | |
| 11382 | + | |
| 11383 | + | |
| 11384 | + | |
| 11385 | + | |
11382 | 11386 | | |
11383 | 11387 | | |
11384 | 11388 | | |
11385 | 11389 | | |
11386 | 11390 | | |
11387 | 11391 | | |
| 11392 | + | |
| 11393 | + | |
| 11394 | + | |
| 11395 | + | |
| 11396 | + | |
| 11397 | + | |
| 11398 | + | |
| 11399 | + | |
| 11400 | + | |
| 11401 | + | |
| 11402 | + | |
| 11403 | + | |
| 11404 | + | |
| 11405 | + | |
| 11406 | + | |
| 11407 | + | |
| 11408 | + | |
| 11409 | + | |
| 11410 | + | |
| 11411 | + | |
11388 | 11412 | | |
11389 | 11413 | | |
11390 | 11414 | | |
| |||
0 commit comments