Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / integrate_null2.php
blobab4cbf75e6147fd5d7ac32bb4e6cc1f68a15405a
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.
12 function foo(array<int> $arr): ?array<int> {
13 $x = null;
14 if (coin_flip()) {
15 $x = $arr;
17 return $x;