Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / yield_wait_forvr.php
blob27c233489f93718d7d7dee99a46db7bb9a370ee6
1 <?hh // strict
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the "hack" directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
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);