Commit 93eac04
Fix assignment in key of array destructuring being ignored
- Propagate scope from key expression processing in list/array destructuring
- Previously the scope result from processing key expressions was discarded,
so assignments like `[($a = 'foo') => $b] = [...]` left `$a` undefined
- New regression test in tests/PHPStan/Analyser/nsrt/bug-14019.php
Closes phpstan/phpstan#140191 parent d32efcb commit 93eac04
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
| 691 | + | |
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments