New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / enum_6.php
blobb5cb1d2b48a3ee9cce3b889271c16cb7f2e66349
1 //// newtype.php
2 <?hh // strict
4 newtype bar = bool;
5 const bar truthy_foo = true;
7 //// def.php
8 <?hh // strict
10 abstract class Enum<T> {
13 newtype foo = bar;
14 class C1 {
15 const foo FOO = truthy_foo;
18 //// use.php
19 <?hh // strict
21 // Should fail because foo isn't an int or a string
22 class C2 extends Enum<foo> {
23 const foo FOO = C1::FOO;