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
Handle this typehints
[hiphop-php.git]
/
hphp
/
test
/
quick
/
fc_enum_2.php
blob
46ba1c9c672756c484933e1412d796cffa589872
1
<
?hh
2
3
// Test that typechecks work when the underlying type is a typedef
4
type Foo
=
int
;
5
enum Bar
:
Foo
as
Foo
{
6
FOO
=
1
;
7
}
8
9
function
test
(
@Bar
$x
):
void
{
10
var_dump
(
$x
);
11
}
12
13
// Should be fine
14
test
(
Bar
::
FOO
);
15
// Should produce warning
16
test
(
"uh"
);
17
// Should produce warning
18
test
(
1.0
);