Handle this typehints
[hiphop-php.git] / hphp / test / quick / hh_type_args3.php
blobffd78acf92af3c092186af8c3ac2b72b4ee0372a
1 <?hh
2 class Foo<a,b,c> {
3 function test1<b,c,d>(b $x) {
5 function test2<b,c,d>(d $x) {
7 function test3<x,y,z>(c<foozle> $x) {
8 // only base name matters
10 function test4(string<foo,bar> $x) {
11 // primitives are ok
13 function test5(d $x) {
14 // this should fail
17 function test6<foo>(foo $x) : garbage {
19 function test7<foo>(string $x) {
21 Foo::test1('foo');
22 Foo::test2('foo');
23 Foo::test3('foo');
24 Foo::test4('foo');
25 Foo::test5('foo');
26 test6('foo');
27 test7('foo');
28 echo "failed";