Check for void/noreturn in conditionals
[hiphop-php.git] / hphp / hack / test / typecheck / array_get_generic_lvalue_array_get.php
blob01243062deb76f16303cc1e3c7c5616b186d524b
1 <?hh //strict
3 /**
4 * Assignment to array makes it unsafe to return it as original generic type
5 */
6 function f<Tv as array<mixed, mixed>>(Tv $a): Tv {
7 $a['a'] = 4;
8 return $a;
11 function test(array<string, string> $a): array<string, string> {
12 return f($a);