New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / covariance7.php
blobb2c7c2b0c27b7b5b6b8237191b2b378c769c5767
1 //// file1.php
2 <?hh // partial
4 newtype ID<+T> = int;
5 newtype UID<+T> as ID<T> = int;
6 newtype OID<+T> as ID<T> = int;
8 //// file2.php
9 <?hh // partial
11 class A {}
12 class B extends A {}
14 function takesIDA(ID<A> $x): void {}
15 function test(UID<B> $x): void {
16 takesIDA($x);