Skip to content

Type\Intersection does not work for > 3 types #8

@bendavies

Description

@bendavies

Hi

Related to #6

$foo = Type\intersection(
    Type\instance_of(Foo::class),
    Type\instance_of(Bar::class),
    Type\instance_of(Baz::class),
    Type\instance_of(Boo::class),
)->assert($foo);

the type of $foo
should be: Foo&Bar&Baz&Boo
but is: (Foo&Bar)|(Baz&Boo)

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions