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
Support is and as
[hiphop-php.git]
/
hphp
/
hack
/
test
/
autocomplete
/
enum_value_fun_arg.php
blob
7926af2bd5d8f96ff9396ded6bcfee6fd9b12381
1
<
?hh
2
3
enum MyEnum
:
string
{
4
TYPE_A
=
"A value"
;
5
TYPE_B
=
"B value"
;
6
TYPE_C
=
"C value"
;
7
}
8
9
function
takes_enum
(
MyEnum
$_
):
void
{}
10
11
function
demo
():
void
{
12
// We should only offer concrete values here, not e.g. MyEnum::getValues().
13
takes_enum
(
MyEnum
::
AUTO332
);
14
}