Skip to content

Generic type clashing #3121

@amorimjuliana

Description

@amorimjuliana

Bug report

PHPStorm cannot resolve a generic parameter if the name clashes across scopes.

Code snippet that reproduces the problem

https://phpstan.org/r/be4f4e02-251b-4ecd-960d-44a024eb16bb (same name)
https://phpstan.org/r/d36e9402-34af-4c91-abeb-510cacca0cc4 (distinct names)

Expected output

No errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions