Skip to content

numeric-string drops from negated intersections #7814

@fluffycondor

Description

@fluffycondor

Bug report

numeric-string drops from negated intersections. But it works when negated with int ranges: mixed~int<48, 57>|int<256, max>|numeric-string Sorry, can't reproduce this example in the sandbox, found it while working on phpstan/phpstan-src#1635.

Code snippet that reproduces the problem

https://phpstan.org/r/d04dbcf2-b699-4db0-a82e-9d84df1ebee9

Expected output

string~numeric-string
mixed~float|int|numeric-string

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