Handle this typehints
[hiphop-php.git] / hphp / test / slow / vec / bad-type-conversion.php
blob274017aafe72ad50beb6ff3f6c3cc521bd6ba193
1 <?hh
3 async function foo() {
4 static $x = false; $x = !$x; return $x;
7 class X {
8 public async function f() {
9 $buckets = vec[];
11 $foo = await foo();
12 if ($foo) {
13 $buckets[] = "hello";
16 return $this->g($buckets);
19 public function g(vec $v) { return $v; }
22 function test() {
23 $x = new X;
24 var_dump(HH\Asio\join($x->f()));
25 var_dump(HH\Asio\join($x->f()));
28 test();