Skip to content

numeric-string in return statement is not always considered as non-empty-string #8787

@boesing

Description

@boesing

Hey there,

I would expect that this is valid.
https://psalm.dev/r/f3c31d26b4

I played a bit and it seems that numeric-string is internally considered as non-empty-string in some cases.

Works: https://psalm.dev/r/0b89d54eda
Does not work: https://psalm.dev/r/9af2a31713
But this works: https://psalm.dev/r/d2c8893799

So it seems that somewhere is an inconsistency for numeric-string being interpreted as non-empty-string.
Any ideas where to tackle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions