Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / variadics / ellipsis_strict_mode.php
blob371e912bfa760b1d341b1c49eb26e3f04b0f2464
1 <?hh // strict
3 function bar((function(): void) $fn): void {}
5 function test1(): (function(): int) {
6 return (...) ==> 4;
9 function test2(): (function(): int) {
10 $x = (...) ==> {};
11 $y = (function(...) {});
13 bar($x);
14 bar($y);
16 return (
17 function(...): int {
18 return 4;
23 function test3(): void {
24 bar((...) ==> {});
27 function test4(): void {
28 bar(function(...): void {});
31 function test5(...): void {}