global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / fc_enum_2.php
blob46ba1c9c672756c484933e1412d796cffa589872
1 <?hh
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;
9 function test(@Bar $x): void {
10 var_dump($x);
13 // Should be fine
14 test(Bar::FOO);
15 // Should produce warning
16 test("uh");
17 // Should produce warning
18 test(1.0);