php-standard-library / phpstan-extension

14 stars 4 forks source link

Unable to resolve the template type TRest in call to function Psl\Type\intersection #6

Open bendavies opened 2 years ago

bendavies commented 2 years ago

Hi,

Unsure if this is the best place to raise this (i suspect not) but:

$offset = Type\intersection(
    Type\int(Foo::class),
    Type\instance_of(Bar::class),
)->assert($offset);

will error: Unable to resolve the template type TRest in call to function Psl\Type\intersection

Same happens for Type\union