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
Correctly instantiate generic attributes for XHP
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
xhp
/
generic_attr1.php
blob
2e22eb900288df30c8bd082ac6de370a2215c6dc
1
<
?hh
// strict
2
3
class
:
my
-
xhp
<
T
> {
4
attribute Vector
<
T
>
foo @required
;
5
}
6
7
function
test
():
int
{
8
$x
= <
my
-
xhp foo
={
Vector
{
"1"
}} />;
9
10
return
$x
->:
foo
[
0
];
11
}