Untyped variadic function types should not be permitted in strict mode
Summary:
Hack allows for two different syntaxes for variadics:
The Hack syntax with `...`:
```
function foo(int $a, ...):void { $args = func_get_args(); }
```
and the PHP version with ```...$param_name```:
```
function foo(int $a, ...$args):void { $x = $args[0]; }
```
In strict mode, the typechecker forbids:
```
function foo(...$x):int{ // type hint required on ...$x
return 5;
}
```
while allowing
```
function foo(...):int{
return 5;
}
```
This diff changes the typechecker behaviour and disallows the `...` syntax in strict mode. Consequently, only variadics with a parameter name and type hint will be allowed in strict mode.
Reviewed By: andrewjkennedy
Differential Revision:
D6834122
fbshipit-source-id:
21ed2341956bc295f07e08f03f25e952c3d55d31