Skip to content

Commit 8b4cab5

Browse files
committed
VoidType::accepts - support CompoundType
1 parent e88491b commit 8b4cab5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Type/VoidType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public function getReferencedClasses(): array
3232

3333
public function accepts(Type $type, bool $strictTypes): TrinaryLogic
3434
{
35+
if ($type instanceof CompoundType) {
36+
return $type->isAcceptedBy($this, $strictTypes);
37+
}
38+
3539
return TrinaryLogic::createFromBoolean($type instanceof self);
3640
}
3741

0 commit comments

Comments
 (0)