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
Disallow ... without type in function typehints
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
fc_enum_case_5.php
blob
8e32ea180d1d0478dd990624680edf3547bf5160
1
<
?hh
// strict
2
3
enum Bar
:
int
{
4
FOO
=
1
;
5
BAR
=
2
;
6
BAZ
=
3
;
7
}
8
9
function
do_case
(
Bar
$x
):
int
{
10
switch
(
$x
) {
11
case
Bar
::
FOO
:
12
return
0
;
13
case
Bar
::
BAR
:
14
return
1
;
15
case
Bar
::
BAZ
:
16
return
2
;
17
default
:
18
return
3
;
19
}
20
}