Support is and as
[hiphop-php.git] / hphp / hack / test / decl / shapes.php.exp
blob18635b5fc75a388b017579c3fbd35e5ae5644048
1 [("\\Coordinate",
2 (Shallow_decl_defs.Typedef
3 { Typing_defs.td_module = None; td_pos = [3:6-16]; td_vis = Transparent;
4 td_tparams = []; td_constraint = None;
5 td_type =
6 (Rhint ([3:19-57]),
7 (Tshape (Typing_defs_core.Open_shape,
8 { (Typing_defs_core.TSFlit_str ([3:25-28], "x")) ->
9 { sft_optional = false;
10 sft_ty = (Rhint ([3:32-37]), (Tprim Tfloat)) };
11 (Typing_defs_core.TSFlit_str ([3:39-42], "y")) ->
12 { sft_optional = false;
13 sft_ty = (Rhint ([3:46-51]), (Tprim Tfloat)) } }
14 )));
15 td_is_ctx = false; td_attributes = []; td_internal = false }));
16 ("\\takes_shape",
17 (Shallow_decl_defs.Fun
18 { Typing_defs.fe_deprecated = None; fe_module = None;
19 fe_internal = false;
20 fe_type =
21 (Rwitness_from_decl ([5:10-21]),
22 (Tfun
23 { ft_tparams = []; ft_where_constraints = [];
24 ft_params =
25 [{ fp_pos = [5:56-61]; fp_name = (Some "$arg1");
26 fp_type =
27 { et_enforced = Typing_defs_core.Unenforced;
28 et_type =
29 (Rhint ([5:22-55]),
30 (Tshape (Typing_defs_core.Closed_shape,
31 { (Typing_defs_core.TSFlit_str ([5:28-31], "x")) ->
32 { sft_optional = false;
33 sft_ty = (Rhint ([5:35-40]), (Tprim Tfloat)) };
34 (Typing_defs_core.TSFlit_str ([5:42-45], "y")) ->
35 { sft_optional = false;
36 sft_ty = (Rhint ([5:49-54]), (Tprim Tfloat)) } }
37 )))
39 fp_flags =
40 (make_fp_flags ~accept_disposable:false ~has_default:false
41 ~mode:Typing_defs_core.FPnormal ~ifc_external:false
42 ~ifc_can_call:false ~readonly:false);
45 ft_implicit_params = { capability = (CapDefaults [5:10-21]) };
46 ft_ret =
47 { et_enforced = Typing_defs_core.Unenforced;
48 et_type =
49 (Rhint ([5:64-74]),
50 (Tapply (([5:64-74], "\\Coordinate"), [])))
52 ft_flags =
53 (make_ft_flags FSync ~return_disposable:false
54 ~returns_readonly:false ~support_dynamic_type:false
55 ~readonly_this:false ~is_memoized:false ~variadic:false);
56 ft_ifc_decl = FDPolicied {PUBLIC} }));
57 fe_pos = [5:10-21]; fe_php_std_lib = false;
58 fe_support_dynamic_type = false }));
59 ("\\returns_shape",
60 (Shallow_decl_defs.Fun
61 { Typing_defs.fe_deprecated = None; fe_module = None;
62 fe_internal = false;
63 fe_type =
64 (Rwitness_from_decl ([9:10-23]),
65 (Tfun
66 { ft_tparams = []; ft_where_constraints = [];
67 ft_params =
68 [{ fp_pos = [10:14-19]; fp_name = (Some "$arg1");
69 fp_type =
70 { et_enforced = Typing_defs_core.Unenforced;
71 et_type =
72 (Rhint ([10:3-13]),
73 (Tapply (([10:3-13], "\\Coordinate"), [])))
75 fp_flags =
76 (make_fp_flags ~accept_disposable:false ~has_default:false
77 ~mode:Typing_defs_core.FPnormal ~ifc_external:false
78 ~ifc_can_call:false ~readonly:false);
81 ft_implicit_params = { capability = (CapDefaults [9:10-23]) };
82 ft_ret =
83 { et_enforced = Typing_defs_core.Unenforced;
84 et_type =
85 (Rhint ([11:4-42]),
86 (Tshape (Typing_defs_core.Open_shape,
87 { (Typing_defs_core.TSFlit_str ([11:10-13], "x")) ->
88 { sft_optional = false;
89 sft_ty = (Rhint ([11:17-22]), (Tprim Tfloat)) };
90 (Typing_defs_core.TSFlit_str ([11:24-27], "y")) ->
91 { sft_optional = false;
92 sft_ty = (Rhint ([11:31-36]), (Tprim Tfloat)) } }
93 )))
95 ft_flags =
96 (make_ft_flags FSync ~return_disposable:false
97 ~returns_readonly:false ~support_dynamic_type:false
98 ~readonly_this:false ~is_memoized:false ~variadic:false);
99 ft_ifc_decl = FDPolicied {PUBLIC} }));
100 fe_pos = [9:10-23]; fe_php_std_lib = false;
101 fe_support_dynamic_type = false }));
102 ("\\generic_shape",
103 (Shallow_decl_defs.Fun
104 { Typing_defs.fe_deprecated = None; fe_module = None;
105 fe_internal = false;
106 fe_type =
107 (Rwitness_from_decl ([15:10-23]),
108 (Tfun
109 { ft_tparams =
110 [{ Typing_defs_core.tp_variance = Invariant;
111 tp_name = ([15:24-25], "T"); tp_tparams = [];
112 tp_constraints = []; tp_reified = Erased;
113 tp_user_attributes = [] }
115 ft_where_constraints = [];
116 ft_params =
117 [{ fp_pos = [15:34-39]; fp_name = (Some "$arg1");
118 fp_type =
119 { et_enforced = Typing_defs_core.Unenforced;
120 et_type =
121 (Rhint ([15:27-33]),
122 (Ttuple
123 [(Rhint ([15:28-29]), (Tgeneric ("T", [])));
124 (Rhint ([15:31-32]), (Tgeneric ("T", [])))]))
126 fp_flags =
127 (make_fp_flags ~accept_disposable:false ~has_default:false
128 ~mode:Typing_defs_core.FPnormal ~ifc_external:false
129 ~ifc_can_call:false ~readonly:false);
132 ft_implicit_params = { capability = (CapDefaults [15:10-23]) };
133 ft_ret =
134 { et_enforced = Typing_defs_core.Unenforced;
135 et_type =
136 (Rhint ([15:42-48]),
137 (Ttuple
138 [(Rhint ([15:43-44]), (Tgeneric ("T", [])));
139 (Rhint ([15:46-47]), (Tgeneric ("T", [])))]))
141 ft_flags =
142 (make_ft_flags FSync ~return_disposable:false
143 ~returns_readonly:false ~support_dynamic_type:false
144 ~readonly_this:false ~is_memoized:false ~variadic:false);
145 ft_ifc_decl = FDPolicied {PUBLIC} }));
146 fe_pos = [15:10-23]; fe_php_std_lib = false;
147 fe_support_dynamic_type = false }));
148 ("\\TaggedCoordinate",
149 (Shallow_decl_defs.Typedef
150 { Typing_defs.td_module = None; td_pos = [19:6-22];
151 td_vis = Transparent; td_tparams = []; td_constraint = None;
152 td_type =
153 (Rhint ([20:3-72]),
154 (Tshape (Typing_defs_core.Closed_shape,
155 { (Typing_defs_core.TSFlit_str ([20:27-34], "coord")) ->
156 { sft_optional = false;
157 sft_ty =
158 (Rhint ([20:38-71]),
159 (Tshape (Typing_defs_core.Closed_shape,
160 { (Typing_defs_core.TSFlit_str ([20:44-47], "x")) ->
161 { sft_optional = false;
162 sft_ty = (Rhint ([20:51-56]), (Tprim Tfloat)) };
163 (Typing_defs_core.TSFlit_str ([20:58-61], "y")) ->
164 { sft_optional = false;
165 sft_ty = (Rhint ([20:65-70]), (Tprim Tfloat)) } }
168 (Typing_defs_core.TSFlit_str ([20:10-15], "tag")) ->
169 { sft_optional = true;
170 sft_ty = (Rhint ([20:19-25]), (Tprim Tstring)) } }
171 )));
172 td_is_ctx = false; td_attributes = []; td_internal = false }))
175 They matched!