Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / pending_switch8.php
blob0b55466c309f3db474d006b29ee79abf8a692e11
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 f(): int {
13 switch (1) {
14 case 1:
15 $x = 1;
16 break;
17 case 2:
18 switch ('x') {
19 case 'x':
20 break;
21 default:
22 $x = 4;
23 break;
25 break;
26 case 3:
27 $x = 8;
28 break;
31 return $x;