Skip to content

Assignment of empty SplObjectStorage #3777

@enumag

Description

@enumag

cc @VincentLanglet

Bug report

There seems to be some issue with the recent SplObjectStorage change - I can't assign empty SplObjectStorage to an annotated property. Note that this works just fine for any other generic type. For instance try replacing SplObjectStorage with ArrayObject in my snippet - no issue there.

Code snippet that reproduces the problem

https://phpstan.org/r/581c9f3d-e534-4802-bc57-9733c92c5b70

Expected output

no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions