Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / test_to_sort_typing1.php
blob0d143b9423e17d724d065774c88b326515730eae
1 <?hh
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.
18 function f($y, $z){
19 $y = $y . $z;
20 $z[0] = 'dd' + 1;
21 return $y;
26 function g($x) {
27 if (true) {
28 $x = array('d' => 'f');
29 return $x;
31 $x['dd'] = 'dd' + $x['dd'];
32 return $x;
39 function g($x) {
40 $x = array('d' => 0);
41 $x['dd'] = 'dd' + $x['dd'];
42 return $x;
48 function extended_friend_cachekey_scb_used_apps($update_params) {
49 $x = $update_params[0];
50 $y = $update_params + 1;
54 class X {
56 public function g(){
57 $y = array();
58 $x = 0;
59 return $x[1];