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
Error on self::class on non final classes
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
fc_enum_3.php
blob
cace3b0e074c79f196d9e58fb66539a289a615a5
1
<
?hh
// strict
2
3
// Should fail because no constraint
4
5
enum Foo
:
int
{
6
FOO
=
1
;
7
BAR
=
2
;
8
BAZ
=
3
;
9
}
10
11
function
test
():
Foo
{
12
return
Foo
::
FOO
;
13
}
14
15
function
test2
(
int
$x
):
void
{}
16
17
function
lurr
():
void
{
18
test2
(
Foo
::
BAR
);
19
}