No error on use of `unsafe_cast`
[hiphop-php.git] / hphp / hack / test / typecheck / super_constraint_5.php
blob52d5f78174b4294af849e8707b2f3d2c3f9f2aad
1 <?hh // strict
2 class FooBase {}
3 class Foo extends FooBase {}
4 class FooDerived extends Foo {}
5 function bar<Tx super Tx1, Tx1 super Foo, Ty as Ty1, Ty1 super Foo>(
6 Ty $val,
7 Tx $dummy,
8 ): Tx {
9 return $val;
11 function test(FooBase $foo_base, FooDerived $foo_derived): void {
12 bar($foo_derived, $foo_base);