Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / subtype_collection_interfaces_4.php
blob57c6619163d9d2213d3dda11894113a75da3e1b4
1 <?hh // strict
2 class B {}
3 class C extends B {}
5 function foo1(Traversable<Traversable<B>> $x): void {}
6 function test1(Iterable<Iterable<C>> $x): void { foo1($x); }
8 function foo2(KeyedTraversable<mixed, Traversable<B>> $x): void {}
9 function test2(KeyedIterable<int, Iterable<C>> $x): void { foo2($x); }
11 function foo3(Container<Traversable<B>> $x): void {}
12 function test3(KeyedContainer<int, Iterable<C>> $x): void { foo3($x); }
14 function foo4(Iterable<Traversable<B>> $x): void {}
15 function test4(Vector<Iterable<C>> $x): void { foo4($x); }
17 function foo5(KeyedIterable<string, Traversable<B>> $x): void {}
18 function test5(Map<string, Iterable<C>> $x): void { foo5($x); }
20 function foo6(KeyedContainer<mixed, Traversable<B>> $x): void {}
21 function test6(Map<string, Iterable<C>> $x): void { foo6($x); }
23 function foo7(Iterator<Traversable<B>> $x): void {}
24 function test7(KeyedIterator<int, Iterable<C>> $x): void { foo7($x); }
26 function foo8(KeyedIterator<mixed, Traversable<B>> $x): void {}
27 function test8(KeyedIterator<int, Iterable<C>> $x): void { foo8($x); }