Skip to content

False positive with yield from #2756

@enumag

Description

@enumag

Bug report

PHPStan doesn't seem to know that yield from expression returns the TReturn type of the generator.

Code snippet that reproduces the problem

https://phpstan.org/r/7ea1777d-63ea-4276-b75e-52fdcc402540

Expected output

No error, the value is actually int: https://3v4l.org/c7GvL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions