File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -879,6 +879,7 @@ public function dataFileAsserts(): iterable
879
879
if (PHP_VERSION_ID >= 80100 ) {
880
880
yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-7167.php ' );
881
881
yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-6864.php ' );
882
+ yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-7776.php ' );
882
883
}
883
884
884
885
yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-7068.php ' );
@@ -970,7 +971,6 @@ public function dataFileAsserts(): iterable
970
971
yield from $ this ->gatherAssertTypes (__DIR__ . '/../Rules/Arrays/data/bug-7469.php ' );
971
972
yield from $ this ->gatherAssertTypes (__DIR__ . '/../Rules/Variables/data/bug-3391.php ' );
972
973
yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-6901.php ' );
973
- yield from $ this ->gatherAssertTypes (__DIR__ . '/data/bug-7776.php ' );
974
974
}
975
975
976
976
/**
Original file line number Diff line number Diff line change @@ -13,3 +13,13 @@ function test(array $settings = []): bool {
13
13
assertType ('array{page?: int, search?: string} ' , $ settings );
14
14
return isset ($ copy ['search ' ]);
15
15
}
16
+
17
+ /**
18
+ * @param array{page?: int, search?: string} $settings
19
+ */
20
+ function test2 (array $ settings = []): bool {
21
+ $ copy = ['page ' => 1 , ...$ settings ];
22
+ assertType ('array{page: int, search?: string} ' , $ copy );
23
+ assertType ('array{page?: int, search?: string} ' , $ settings );
24
+ return isset ($ copy ['search ' ]);
25
+ }
You can’t perform that action at this time.
0 commit comments