repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Disallow ... without type in function typehints
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
array_get_generic_non_lvalue.php
blob
44e5250a04449831111d5595626470f3e7a78f20
1
<
?hh
//strict
2
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
;
9
}
10
11
function
test
(
array
<
string
,
string
>
$a
):
array
<
string
,
string
> {
12
return
f
(
$a
);
13
}