File tree Expand file tree Collapse file tree 3 files changed +5
-27
lines changed Expand file tree Collapse file tree 3 files changed +5
-27
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ private static function findTestFiles(): iterable
207
207
yield __DIR__ . '/../Rules/Classes/data/bug-11591-property-tag.php ' ;
208
208
yield __DIR__ . '/../Rules/Classes/data/mixin-trait-use.php ' ;
209
209
210
- yield __DIR__ . '/data/bug-4801.php ' ;
210
+ yield __DIR__ . '/../Rules/Methods/ data/bug-4801.php ' ;
211
211
yield __DIR__ . '/data/template-default.php ' ;
212
212
}
213
213
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
namespace Bug4801 ;
4
4
5
+ use function PHPStan \Testing \assertType ;
6
+
5
7
/**
6
8
* @template T
7
9
*/
@@ -18,5 +20,6 @@ public function work(callable|null $a): I;
18
20
* @param I<string> $i
19
21
*/
20
22
function x (I $ i ) {
21
- $ i ->work (null );
23
+ assertType ('Bug4801 \\I<string> ' , $ i ->work (null ));
24
+ assertType ('Bug4801 \\I<int> ' , $ i ->work (fn (string $ a ) => (int ) $ a ));
22
25
}
You can’t perform that action at this time.
0 commit comments