-
-
Notifications
You must be signed in to change notification settings - Fork 947
Offset 0 should not be optional on non empty list #14308
Copy link
Copy link
Closed
Labels
Milestone
Description
Bug report
The error Offset 0 might not exist on non-empty-list{0?: 'redoc'|'scalar'|'swagger', 1?: 'redoc'|'scalar', 2?: 'scalar'} is odd.
It should have been improved by phpstan/phpstan-src#5067
which worked on intersection of ConstantArray and AccessoryIsList
Code snippet that reproduces the problem
Expected output
No errors.
And the dumpType could even be
list{0: 'redoc'|'scalar'|'swagger', 1?: 'redoc'|'scalar', 2?: 'scalar'}
or non-empty-list{0: 'redoc'|'scalar'|'swagger', 1?: 'redoc'|'scalar', 2?: 'scalar'}.
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable