File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -679,6 +679,10 @@ public function dataFileAsserts(): iterable
679679 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/hash-functions-74.php ' );
680680 }
681681
682+ if (PHP_VERSION_ID >= 80000 ) {
683+ yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-6308.php ' );
684+ }
685+
682686 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-6500.php ' );
683687 }
684688
Original file line number Diff line number Diff line change 1+ <?php // lint >= 8.0
2+
3+ declare (strict_types=1 );
4+
5+ namespace Bug6308 ;
6+
7+ use function PHPStan \Testing \assertType ;
8+
9+ class BaseFinderStatic
10+ {
11+ static public function find (): false |static
12+ {
13+ return false ;
14+ }
15+ }
16+
17+ final class UnionStaticStrict extends BaseFinderStatic
18+ {
19+ public function something ()
20+ {
21+ assertType ('Bug6308\UnionStaticStrict|false ' , $ this ->find ());
22+ }
23+ }
24+
25+ class UnionStaticStrict2 extends BaseFinderStatic
26+ {
27+ public function something ()
28+ {
29+ assertType ('static(Bug6308\UnionStaticStrict2)|false ' , $ this ->find ());
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments