Commit b9f6f8c
Fix param-out list type lost during nested array dim assignment
- Pass correctly computed valueToWrite type to VariableAssignNode instead of
the assignedPropertyExpr expression tree which loses list types on nested
array dimension assignments
- The assignedPropertyExpr uses setOffsetValueType for non-outermost dims,
losing AccessoryArrayListType, while produceArrayDimFetchAssignValueToWrite
correctly uses setExistingOffsetValueType via cross-paired dim fetch checks
- New regression test in tests/PHPStan/Rules/Variables/data/bug-14124.php
Closes phpstan/phpstan#141241 parent 8717c5d commit b9f6f8c
File tree
3 files changed
+36
-2
lines changed- src/Analyser
- tests/PHPStan/Rules/Variables
- data
3 files changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6297 | 6297 | | |
6298 | 6298 | | |
6299 | 6299 | | |
6300 | | - | |
| 6300 | + | |
6301 | 6301 | | |
6302 | 6302 | | |
6303 | 6303 | | |
| |||
6314 | 6314 | | |
6315 | 6315 | | |
6316 | 6316 | | |
6317 | | - | |
| 6317 | + | |
6318 | 6318 | | |
6319 | 6319 | | |
6320 | 6320 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
| 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 | + | |
0 commit comments