Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / array_get_generic_non_lvalue.php
blob44e5250a04449831111d5595626470f3e7a78f20
1 <?hh //strict
3 /**
4 * Generic type remains generic if it was not modified.
5 */
6 function f<Tv as KeyedContainer<string, mixed>>(Tv $a): Tv {
7 $a['a'];
8 return $a;
11 function test(array<string, string> $a): array<string, string> {
12 return f($a);