Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / reactive / test_mutable_arg1.php
blobd0840d5ca52427c1e9430dde9f1ec815ae020890
1 <?hh // strict
3 class Foo {
4 <<__Rx>>
5 public function __construct(public int $value) {}
8 <<__Rx>>
9 function foo(<<__Mutable>>Foo $x): void {
10 $x->value = 5;
13 <<__Rx>>
14 function test(): void {
15 $x = new Foo(7);
16 foo($x); // no errors
17 foo(new Foo(8)); // no problemo
18 freeze($x);
19 foo($x); // error