Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / list_assign_vec.php
blob4f7dd1ddc9e971b12c4dc6a933d5842dd75487d7
1 <?hh // strict
3 function test<T as vec<int>>(vec<int> $vec, T $list): (int, int) {
4 list($x, $y) = $vec;
5 hh_show($x);
6 hh_show($y);
8 list($a, $b) = vec['asterix', 'obelix'];
9 hh_show($a);
10 hh_show($b);
12 list($i1, $i2) = $list;
13 hh_show($i1);
14 hh_show($i2);
16 return tuple($i1, $i2);