Skip to content

@var with type array{numeric-string} is not subtype of type array{numeric-string} #12457

@janedbal

Description

@janedbal

Bug report

See snippet. This can easily happen when phpstan-doctrine 2.0.1 is used (where numeric-strings are now using such intersection). The main problem is that the real type (numeric-string&uppercase-string&lowercase-string) is not shown in the error message.

Code snippet that reproduces the problem

https://phpstan.org/r/26207fbf-25ba-4ead-9ceb-ea25b7dae1b0

Expected output

PHPDoc tag @var with type array{numeric-string} is not subtype of type array{numeric-string&uppercase-string&lowercase-string}.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions