Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / asyncgen3.php
blob3903282d9d62b1d51282b2074f21f97141689ba5
1 <?hh // partial
3 async function foo(): Awaitable<string> {
4 return 'hi test';
7 function f(): AsyncGenerator<int, string, void> {
8 $x = await foo();
9 yield 42 => $x;
12 function expect<T>(T $x): void { }
14 async function g(): Awaitable<void> {
15 foreach (f() await as $x => $y) {
16 expect<int>($x);
17 expect<string>($y);