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
/
unresolved_assign2.php
blob
980e0c39b7208e58f9c398648b8436860dc8d25c
1
<
?hh
// strict
2
3
function
expects_int
(
int
$_
):
void
{}
4
5
class
C
{
6
7
public function
__construct
(
private
vec
<
mixed
>
$x
) {}
8
9
public function
test
():
void
{
10
hh_show
(
$this
->
x
);
11
foreach
(
vec
[]
as
$_
) {
12
}
13
hh_show
(
$this
->
x
);
14
$this
->
x
=
vec
[
1
,
2
,
3
];
15
foreach
(
$this
->
x
as
$v
) {
16
expects_int
(
$v
);
17
}
18
}
19
}