Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / pending_if4.php
blob7fa3bd8f9d558daafeab2f1b18d8f496a11f25ae
1 <?hh // partial
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 f(): int {
13 $b = true;
14 $c = false;
15 if ($b) {
16 $x = 1;
17 } else if ($c) {
18 $x = false;
19 } else {
20 $x = 4;
23 return $x;