Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / super_constraint_4.php
blob92dc6e0d612759943558c47500c3c09deb381220
1 <?hh // strict
2 class FooBase {}
3 class Foo extends FooBase {}
4 class FooDerived extends Foo {}
5 class BlahBase {}
6 class Blah extends BlahBase {}
7 class BlahDerived extends Blah {}
8 function bar<Tx super Tx1, Tx1 super Foo, Ty as Ty1, Ty1 as Blah>(
9 Ty $val,
10 Tx $dummy,
11 ): Tx {
12 return $val;
14 function test(BlahBase $blah_base, FooDerived $foo_derived): void {
15 bar($foo_derived, $blah_base);