Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / asyncgen2.php
blob87cc8aee9e7cf2c919d5c26f3e467d4b8efdcd92
1 <?hh
3 async function foo(): Awaitable<string> {
4 return 'hi test';
7 async function f(): AsyncGenerator<int, string, void> {
8 $x = await foo();
9 yield 42 => $x;
12 async function g(): Awaitable<void> {
13 foreach (f() as $x => $y) {
14 hh_show($x);
15 hh_show($y);