Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / shape_key_exists5.php
blob198f81d77f21e086a06e058639db391f206738ed
1 <?hh // strict
3 // Nonexisting field in intersection of ad-hoc shapes
5 function test2(bool $b): void {
7 $s = shape('x' => 4);
8 $t = shape('y' => 'aaa');
10 if ($b) {
11 $st = $s;
12 } else {
13 $st = $t;
15 Shapes::keyExists($s, 'z');