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
Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
list_assign_vec.php
blob
4f7dd1ddc9e971b12c4dc6a933d5842dd75487d7
1
<
?hh
// strict
2
3
function
test
<
T
as
vec
<
int
>>(
vec
<
int
>
$vec
,
T
$list
): (
int
,
int
) {
4
list
(
$x
,
$y
) =
$vec
;
5
hh_show
(
$x
);
6
hh_show
(
$y
);
7
8
list
(
$a
,
$b
) =
vec
[
'asterix'
,
'obelix'
];
9
hh_show
(
$a
);
10
hh_show
(
$b
);
11
12
list
(
$i1
,
$i2
) =
$list
;
13
hh_show
(
$i1
);
14
hh_show
(
$i2
);
15
16
return
tuple
(
$i1
,
$i2
);
17
}