Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / unresolved_assign2.php
blob980e0c39b7208e58f9c398648b8436860dc8d25c
1 <?hh // strict
3 function expects_int(int $_): void {}
5 class C {
7 public function __construct(private vec<mixed> $x) {}
9 public function test(): void {
10 hh_show($this->x);
11 foreach (vec[] as $_) {
13 hh_show($this->x);
14 $this->x = vec[1, 2, 3];
15 foreach ($this->x as $v) {
16 expects_int($v);