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
/
meth_caller10.php
blob
56a5fc3687f101226d7cf217af7645695a731f03
1
<
?hh
// strict
2
3
class
X
<
T
> {
4
public function
foo
(
T
$x
):
T
{
5
return
$x
;
6
}
7
}
8
9
function
test
():
X
<
int
> {
10
$caller
=
meth_caller
(
'X'
,
'foo'
);
11
$x
=
new
X
();
12
$caller
(
$x
,
'a string'
);
13
return
$x
;
14
}