Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / covariance8.php
blob6129e5c86e84b9af40459cc026d79bf737e3a063
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);