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