Skip to content

Commit 692e284

Browse files
committed
Add test on variadic arguments
1 parent 83371c7 commit 692e284

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Type/data/reflection-helper.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,16 @@ public function testOnUnionOfMethods(string $method): void
188188
self::getPrivateMethodInvoker($this, $method),
189189
);
190190
}
191+
192+
public function testOnVariadicArguments(): void
193+
{
194+
$anon = new class () {
195+
public function testing(string $a, int $b, bool $c, string ...$d): void {}
196+
};
197+
198+
assertType(
199+
'Closure(string, int, bool, string ...): void',
200+
self::getPrivateMethodInvoker($anon, 'testing'),
201+
);
202+
}
191203
}

0 commit comments

Comments
 (0)