Skip to content

Remembered type must became maybe after passed by reference #9503

@mvorisek

Description

@mvorisek

Bug report

In the code below, the variable is completely replaced when match is succesful. Previously remebered type must be converted to maybe.

Code snippet that reproduces the problem

https://phpstan.org/r/7b53252f-fd9e-4fef-9ae8-2d61bcf889fd

Expected output

No error - the current error is false positive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions