Skip to content

Type narrowed to non-empty-string is not retained by template #9472

@bendavies

Description

@bendavies

Bug report

Hi there,

In the following snippet, I was expecting the dumped type to be non-empty-string, but that is lost somewhere and broadened to string

Thanks!

Code snippet that reproduces the problem

https://phpstan.org/r/15313fea-5813-4d90-89f9-38f27cba1e32

Expected output

Dumped type: non-empty-string

Did PHPStan help you today? Did it make you happy in any way?

Of course. how did we ever code php without it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions