Constraints for function arguments
[hiphop-php.git] / hphp / hack / test / shape_analysis / simplify_constraints / switch4.php
blobb9e8581c688ac065d16e78306d07fe7cd0fbc4b9
1 <?hh
3 function f(): void {
4 $d = dict[];
5 $i = 42;
6 switch ($i) {
7 case 0:
8 $d['a'] = 42;
9 inspect($d);
10 break;
11 case 1:
12 $d = dict[];
13 $d['b'] = 'hi';
14 inspect($d);
15 // FALLTHROUGH
16 default:
17 $d['c'] = false;
18 inspect($d);
20 $d['d'] = 3.14;
21 inspect($d);
24 function inspect(mixed $_): void {}