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
Teach the typechecker to understand Map appends
[hiphop-php.git]
/
hphp
/
hack
/
test
/
more_tests
/
map_append1.php
blob
45eb59d16b93dc988e237d4def30ff784a655b6c
1
<
?hh
// strict
2
3
function
foo
(
Map
<
string
,
int
>
$m
,
Pair
<
string
,
int
>
$p
):
Map
<
string
,
int
> {
4
$m
[] =
$p
;
5
$m
[] =
Pair
{
'hello'
,
123
};
6
return
$m
;
7
}