psalm: Incorrectly inferred array type when merging in loop
All of these incorrectly infer $array
to have exactly two values:
https://psalm.dev/r/2cdcc77b29
https://psalm.dev/r/6ce02613d5 (also incorrectly has 0
key possibly undefined)
https://psalm.dev/r/6c18545837 (also incorrectly has 0
and 1
keys possibly undefined)
https://psalm.dev/r/6aefa34537 (also incorrectly has 0
key possibly undefined)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 22
@davidbyoung That looks like #7297.
Let’s move the discussion here: https://github.com/psalm/psalm.dev/issues/71