Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / fc_enum_14.php
blobaec19317321b5051f5b3e2a51d50435324a63e85
1 <?hh // partial
3 enum Foo: int {
4 FOO = 1;
5 BAR = 2;
6 BAZ = 3;
9 enum Bar: Foo as Foo {
10 FOO = Foo::FOO;
13 // Nullable enum supertype is still a supertype
14 function f(): ?Bar {
15 return Bar::FOO;