Skip to content

Closure/callable must wrap the union/intersect return type into parenthesis when dumped #9268

@mvorisek

Description

@mvorisek

Bug report

related with phpstan/phpdoc-parser#74

Closure(): (int|string) != (Closure(): int|string == (Closure(): int) | string)

Code snippet that reproduces the problem

https://phpstan.org/r/aa925ab2-d8b0-45e0-bd39-3568e55ead16

Expected output

the dumped type must never parse to something else than the original

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions