Skip to content
Permalink
Browse files

Fix #1641 - crawl intersection types

  • Loading branch information...
muglug committed May 16, 2019
1 parent 8f129f8 commit 3599c20316c25b3a2f30436757dd8d8baf0d3892
Showing with 22 additions and 0 deletions.
  1. +15 −0 src/Psalm/Type/Atomic.php
  2. +7 −0 tests/AnnotationTest.php
@@ -605,6 +605,21 @@ public function queueClassLikesForScanning(
}
}
if ($this instanceof TNamedObject
|| $this instanceof TIterable
|| $this instanceof TTemplateParam
) {
if ($this->extra_types) {
foreach ($this->extra_types as $extra_type) {
$extra_type->queueClassLikesForScanning(
$codebase,
$file_storage,
$phantom_classes
);
}
}
}
if ($this instanceof TScalarClassConstant) {
$codebase->scanner->queueClassLikeForScanning(
$this->fq_classlike_name,
@@ -967,6 +967,13 @@ public function doFoo(): array {
'$b' => 'array<array-key, int>',
]
],
'noExceptionOnIntersection' => [
'<?php
class Foo {
/** @var null|\DateTime&\DateTimeImmutable */
private $s = null;
}',
],
];
}

0 comments on commit 3599c20

Please sign in to comment.
You can’t perform that action at this time.