Skip to content

False Positive Within Nested return type of generic functions #5562

@mr-feek

Description

@mr-feek

Bug report

I'm on version 0.12.95

These return types should be the same, no?

Function foo() should return T of int|string but returns int|string.

Code snippet that reproduces the problem

https://phpstan.org/r/da00afd4-bcaa-45c4-92ca-d02ed7a0e91c

Expected output

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

PHPStan has helped me so much as an engineer. Thank you all contributors for the work that you do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions