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