No error on use of `unsafe_cast`
[hiphop-php.git] / hphp / hack / test / typecheck / async_function_implicit_return_wrong_type3.php
blob445c03d8adb44185c0190f44b5b2c5302ba942ab
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 coin_flip(): bool { return false; }
14 function f(Awaitable<void> $a, Awaitable<void> $b): Awaitable<void> {
15 if (coin_flip()) { return $a; }
16 if (coin_flip()) { return $b; }
17 // Implicit return null in a normal function is not compatible with
18 // Awaitable<void>