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
No error on use of `unsafe_cast`
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
fc_enum_case_11.php
blob
a28b13e14073892cd3d85edcc7968ee3ca392769
1
<
?hh
// strict
2
3
enum MyEnum
:
string
{
4
A
=
'a'
;
5
B
=
'b'
;
6
}
7
8
function
f
(
MyEnum
$e
):
void
{
9
// Force to be Tvar/Tunion
10
if
(
true
) {
11
$e
=
MyEnum
::
A
;
12
}
13
14
switch
(
$e
) {
15
case
MyEnum
::
A
:
break
;
16
}
17
}