repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Constraints for function arguments
[hiphop-php.git]
/
hphp
/
hack
/
test
/
shape_analysis
/
simplify_constraints
/
switch4.php
blob
b9e8581c688ac065d16e78306d07fe7cd0fbc4b9
1
<
?hh
2
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
);
19
}
20
$d
[
'd'
] =
3.14
;
21
inspect
(
$d
);
22
}
23
24
function
inspect
(
mixed
$_
):
void
{}