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
global statement removal: hphp/test [7/x]
[hiphop-php.git]
/
hphp
/
test
/
quick
/
fc_enum_4.php
blob
57ea2aa4a8470d374daf5a77880986ad554b51ca
1
<
?hh
// strict
2
3
enum Foo
:
int
as
int
{
4
FOO
=
1
;
5
BAR
=
2
;
6
BAZ
=
3
;
7
}
8
9
enum Bar
:
Foo
as
int
{
10
FOO
=
Foo
::
FOO
;
11
BAR
=
Foo
::
BAR
;
12
}
13
14
15
function
test
(
@Bar
$x
):
void
{
16
var_dump
(
$x
);
17
}
18
19
// These should be fine
20
test
(
Bar
::
FOO
);
21
test
(
Bar
::
BAR
);
22
// These should fail
23
test
(
"hello"
);
24
test
(
10.0
);