Skip to content

array_reverse on variable length list gives strange results #11148

@MoonE

Description

@MoonE

https://psalm.dev/r/090d9ad9ef

Wrong: array{0?: 'b', 1: 'a'}
Correct: array{0: 'a'|'b', 1?: 'a'} or array{0:'a'}|array{0:'b',1:'a'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions