Remember fresh type variables for unions and await statement
[hiphop-php.git] / hphp / hack / test / typecheck / new_inference / yield_wait_forvr.php
blobfa83c900c2a83c53266c2f046fabe0a149a39b55
1 <?hh // strict
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
12 function show<T>(T $x): void {}
14 async function gen_int(): Awaitable<int> {
15 return 42;
18 async function test(): Awaitable<void> {
19 $a = array(
20 'foo' => gen_int(),
21 'bar' => array(
22 'baz' => gen_int(),
23 'quux' => array('innermost' => gen_int()),
25 'something else' => array('one last thing' => gen_int()),
28 await gen_array_rec($a);