New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / bad_type_structure_class.php
blob6f3ebf412512c1f23e35f51524cbaca65312384f
1 <?hh // strict
3 class C<T> {}
5 function concrete(TypeStructure<C<int>> $ts): void {
6 hh_show($ts['kind']);
7 hh_show($ts['alias']);
8 hh_show($ts['name']);
9 hh_show($ts['classname']);
10 hh_show($ts['generic_types']);
12 // any other field will fail
13 hh_show($ts['nullable']);
14 hh_show($ts['elem_types']);
15 hh_show($ts['fields']);
16 hh_show($ts['param_types']);
17 hh_show($ts['return_type']);
19 // make sure kind still works
20 hh_show($ts['kind']);
23 function generic<T as C<int>>(TypeStructure<T> $ts): void {
24 hh_show($ts['kind']);
25 hh_show($ts['alias']);
26 hh_show($ts['name']);
27 hh_show($ts['classname']);
28 hh_show($ts['generic_types']);
30 // any other field will fail
31 hh_show($ts['nullable']);
32 hh_show($ts['elem_types']);
33 hh_show($ts['fields']);
34 hh_show($ts['param_types']);
35 hh_show($ts['return_type']);
37 // make sure kind still works
38 hh_show($ts['kind']);