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
/
list_assign.php
blob
c11ac1ee54848c7674fc78e7b238c54eb2a9a965
1
<
?hh
// strict
2
3
function
test
<
T
as
Vector
<
int
>>(
Vector
<
int
>
$vec
,
T
$list
): (
int
,
int
) {
4
list
(
$x
,
$y
) =
$vec
;
5
hh_show
(
$x
);
6
hh_show
(
$y
);
7
8
list
(
$i1
,
$i2
) =
$list
;
9
hh_show
(
$i1
);
10
hh_show
(
$i2
);
11
12
return
tuple
(
$i1
,
$i2
);
13
}