mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Allow generator to be used as a traversable
This commit is contained in:
parent
8cd83a581a
commit
5cbd25fccc
@ -149,6 +149,10 @@ class ClassChecker extends ClassLikeChecker
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($interface_id === 'traversable' && $fq_class_name === 'generator') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isset(self::$SPECIAL_TYPES[$interface_id]) || isset(self::$SPECIAL_TYPES[$fq_class_name])) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user