New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / subtype_collection_interfaces_1.php
blobb0014cbd8b72599d6408128f4b19843860d10999
1 <?hh // strict
2 class B {}
3 class C extends B {}
5 function foo1(array<B> $x): void {}
6 function test1(array<C> $x): void { foo1($x); }
8 function foo2(array<mixed, B> $x): void {}
9 function test2(array<int, C> $x): void { foo2($x); }
11 function foo3(Traversable<B> $x): void {}
12 function test3(array<C> $x): void { foo3($x); }
14 function foo4(KeyedTraversable<mixed, B> $x): void {}
15 function test4(array<int, C> $x): void { foo4($x); }
17 function foo5(Container<B> $x): void {}
18 function test5(array<C> $x): void { foo5($x); }
20 function foo6(KeyedContainer<arraykey, B> $x): void {}
21 function test6(array<int, C> $x): void { foo6($x); }
23 function foo7(KeyedContainer<arraykey, B> $x): void {}
24 function test7(array<int, C> $x): void { foo7($x); }