Skip to content

String accessory types are normalized to string types when used with generics #7301

@mad-briller

Description

@mad-briller

Bug report

This issue exists on 1.7.0

When using generics with string accessory types, the accessory types are lost:

Code snippet that reproduces the problem

https://phpstan.org/r/784f01e9-f48e-4bcb-89dc-a49cacb2c34e

Expected output

Expected to see array<non-empty-string, mixed> in the \PHPStan\dumpType output.

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

PHPStan helps me everyday! congrats on the 1.7.0 release with fully static analysis, great work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions