Skip to content

Wildcard is incorrectly parsed in class constants #2785

@rybakit

Description

@rybakit

Psalm (dev-master@074780547d1db495b3ddd763e595fd5c68ab99cc) does not recognize @var Foo::* and @return Foo::*, though @param Foo::* $arg works without problems.

It seems that the parser expects the variable name (or any other string) after the "wildcarded" variable type. This may explain why @param works, but @var and @return need an extra symbol to make them work as expected, eg @var Foo::** or @var Foo::* $.

Snippet: https://psalm.dev/r/7928c2f41e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions