Introduce the ConstFun attribute
[hiphop-php.git] / hphp / hack / test / decl / mutable.php.exp
blob92cd1b51b591471c3f7b8e2dcf5ac3e83823c5b4
1 [("\\A",
2 (Shallow_decl_defs.Class
3 { Shallow_decl_defs.sc_mode = Mstrict; sc_final = false;
4 sc_is_xhp = false; sc_has_xhp_keyword = false; sc_kind = Cnormal;
5 sc_name = ([3:7-8], "\\A"); sc_tparams = [];
6 sc_where_constraints = []; sc_extends = []; sc_uses = [];
7 sc_xhp_attr_uses = []; sc_req_extends = []; sc_req_implements = [];
8 sc_implements = []; sc_implements_dynamic = false; sc_consts = [];
9 sc_typeconsts = []; sc_props = []; sc_sprops = [];
10 sc_constructor = None; sc_static_methods = []; sc_methods = [];
11 sc_user_attributes = []; sc_enum_type = None }));
12 ("\\f",
13 (Shallow_decl_defs.Fun
14 { Typing_defs.fe_deprecated = None;
15 fe_type =
16 (Rwitness (root|mutable.php line 6, characters 10-10),
17 (Tfun
18 { ft_arity = (Fstandard ()); ft_tparams = [];
19 ft_where_constraints = [];
20 ft_params =
21 [{ fp_pos = [6:47-49]; fp_name = (Some "$a");
22 fp_type =
23 { et_enforced = false;
24 et_type =
25 (Rhint (root|mutable.php line 6, characters 12-45),
26 (Tfun
27 { ft_arity = (Fstandard ()); ft_tparams = [];
28 ft_where_constraints = [];
29 ft_params =
30 [{ fp_pos = [6:35-36]; fp_name = None;
31 fp_type =
32 { et_enforced = false;
33 et_type =
34 (Rhint (root|mutable.php line 6, characters 35-35),
35 (Tapply (([6:35-36], "\\A"), [])))
37 fp_rx_annotation = None;
38 fp_flags =
39 (make_fp_flags
40 ~mutability:(Some Typing_defs_core.Param_borrowed_mutable)
41 ~accept_disposable:false ~has_default:false
42 ~mode:Typing_defs_core.FPnormal
43 ~ifc_external:false ~ifc_can_call:false
44 ~is_atom:false ~readonly:false
45 ~const_function:false);
48 ft_implicit_params =
49 { capability = (CapDefaults [6:12-46]) };
50 ft_ret =
51 { et_enforced = false;
52 et_type =
53 (Rhint (root|mutable.php line 6, characters 40-43),
54 (Tprim Tvoid))
56 ft_flags =
57 (make_ft_flags FSync None ~return_disposable:false
58 ~returns_mutable:false ~returns_void_to_rx:false
59 ~returns_readonly:false ~readonly_this:false
60 ~is_const:false);
61 ft_reactive = Pure {};
62 ft_ifc_decl = FDPolicied {PUBLIC} }))
64 fp_rx_annotation = None;
65 fp_flags =
66 (make_fp_flags ~mutability:None ~accept_disposable:false
67 ~has_default:false ~mode:Typing_defs_core.FPnormal
68 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
69 ~readonly:false ~const_function:false);
72 ft_implicit_params = { capability = (CapDefaults [6:10-11]) };
73 ft_ret =
74 { et_enforced = false;
75 et_type =
76 (Rhint (root|mutable.php line 6, characters 52-55),
77 (Tprim Tvoid))
79 ft_flags =
80 (make_ft_flags FSync None ~return_disposable:false
81 ~returns_mutable:false ~returns_void_to_rx:false
82 ~returns_readonly:false ~readonly_this:false ~is_const:false);
83 ft_reactive = Pure {}; ft_ifc_decl = FDPolicied {PUBLIC} }));
84 fe_pos = [6:10-11]; fe_php_std_lib = false }));
85 ("\\g",
86 (Shallow_decl_defs.Fun
87 { Typing_defs.fe_deprecated = None;
88 fe_type =
89 (Rwitness (root|mutable.php line 9, characters 10-10),
90 (Tfun
91 { ft_arity = (Fstandard ()); ft_tparams = [];
92 ft_where_constraints = [];
93 ft_params =
94 [{ fp_pos = [9:52-54]; fp_name = (Some "$a");
95 fp_type =
96 { et_enforced = false;
97 et_type =
98 (Rhint (root|mutable.php line 9, characters 12-50),
99 (Tfun
100 { ft_arity = (Fstandard ()); ft_tparams = [];
101 ft_where_constraints = [];
102 ft_params =
103 [{ fp_pos = [9:40-41]; fp_name = None;
104 fp_type =
105 { et_enforced = false;
106 et_type =
107 (Rhint (root|mutable.php line 9, characters 40-40),
108 (Tapply (([9:40-41], "\\A"), [])))
110 fp_rx_annotation = None;
111 fp_flags =
112 (make_fp_flags
113 ~mutability:(Some Typing_defs_core.Param_maybe_mutable)
114 ~accept_disposable:false ~has_default:false
115 ~mode:Typing_defs_core.FPnormal
116 ~ifc_external:false ~ifc_can_call:false
117 ~is_atom:false ~readonly:false
118 ~const_function:false);
121 ft_implicit_params =
122 { capability = (CapDefaults [9:12-51]) };
123 ft_ret =
124 { et_enforced = false;
125 et_type =
126 (Rhint (root|mutable.php line 9, characters 45-48),
127 (Tprim Tvoid))
129 ft_flags =
130 (make_ft_flags FSync None ~return_disposable:false
131 ~returns_mutable:false ~returns_void_to_rx:false
132 ~returns_readonly:false ~readonly_this:false
133 ~is_const:false);
134 ft_reactive = Pure {};
135 ft_ifc_decl = FDPolicied {PUBLIC} }))
137 fp_rx_annotation = None;
138 fp_flags =
139 (make_fp_flags ~mutability:None ~accept_disposable:false
140 ~has_default:false ~mode:Typing_defs_core.FPnormal
141 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
142 ~readonly:false ~const_function:false);
145 ft_implicit_params = { capability = (CapDefaults [9:10-11]) };
146 ft_ret =
147 { et_enforced = false;
148 et_type =
149 (Rhint (root|mutable.php line 9, characters 57-60),
150 (Tprim Tvoid))
152 ft_flags =
153 (make_ft_flags FSync None ~return_disposable:false
154 ~returns_mutable:false ~returns_void_to_rx:false
155 ~returns_readonly:false ~readonly_this:false ~is_const:false);
156 ft_reactive = Pure {}; ft_ifc_decl = FDPolicied {PUBLIC} }));
157 fe_pos = [9:10-11]; fe_php_std_lib = false }));
158 ("\\h",
159 (Shallow_decl_defs.Fun
160 { Typing_defs.fe_deprecated = None;
161 fe_type =
162 (Rwitness (root|mutable.php line 12, characters 10-10),
163 (Tfun
164 { ft_arity = (Fstandard ()); ft_tparams = [];
165 ft_where_constraints = [];
166 ft_params =
167 [{ fp_pos = [12:52-54]; fp_name = (Some "$a");
168 fp_type =
169 { et_enforced = false;
170 et_type =
171 (Rhint (root|mutable.php line 12, characters 12-50),
172 (Tfun
173 { ft_arity = (Fstandard ()); ft_tparams = [];
174 ft_where_constraints = [];
175 ft_params =
176 [{ fp_pos = [12:40-41]; fp_name = None;
177 fp_type =
178 { et_enforced = false;
179 et_type =
180 (Rhint (root|mutable.php line 12, characters 40-40),
181 (Tapply (([12:40-41], "\\A"), [])))
183 fp_rx_annotation = None;
184 fp_flags =
185 (make_fp_flags
186 ~mutability:(Some Typing_defs_core.Param_owned_mutable)
187 ~accept_disposable:false ~has_default:false
188 ~mode:Typing_defs_core.FPnormal
189 ~ifc_external:false ~ifc_can_call:false
190 ~is_atom:false ~readonly:false
191 ~const_function:false);
194 ft_implicit_params =
195 { capability = (CapDefaults [12:12-51]) };
196 ft_ret =
197 { et_enforced = false;
198 et_type =
199 (Rhint (root|mutable.php line 12, characters 45-48),
200 (Tprim Tvoid))
202 ft_flags =
203 (make_ft_flags FSync None ~return_disposable:false
204 ~returns_mutable:false ~returns_void_to_rx:false
205 ~returns_readonly:false ~readonly_this:false
206 ~is_const:false);
207 ft_reactive = Pure {};
208 ft_ifc_decl = FDPolicied {PUBLIC} }))
210 fp_rx_annotation = None;
211 fp_flags =
212 (make_fp_flags ~mutability:None ~accept_disposable:false
213 ~has_default:false ~mode:Typing_defs_core.FPnormal
214 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
215 ~readonly:false ~const_function:false);
218 ft_implicit_params = { capability = (CapDefaults [12:10-11]) };
219 ft_ret =
220 { et_enforced = false;
221 et_type =
222 (Rhint (root|mutable.php line 12, characters 57-60),
223 (Tprim Tvoid))
225 ft_flags =
226 (make_ft_flags FSync None ~return_disposable:false
227 ~returns_mutable:false ~returns_void_to_rx:false
228 ~returns_readonly:false ~readonly_this:false ~is_const:false);
229 ft_reactive = Pure {}; ft_ifc_decl = FDPolicied {PUBLIC} }));
230 fe_pos = [12:10-11]; fe_php_std_lib = false }));
231 ("\\i",
232 (Shallow_decl_defs.Fun
233 { Typing_defs.fe_deprecated = None;
234 fe_type =
235 (Rwitness (root|mutable.php line 15, characters 10-10),
236 (Tfun
237 { ft_arity = (Fstandard ()); ft_tparams = [];
238 ft_where_constraints = [];
239 ft_params =
240 [{ fp_pos = [15:48-50]; fp_name = (Some "$a");
241 fp_type =
242 { et_enforced = false;
243 et_type =
244 (Rhint (root|mutable.php line 15, characters 12-46),
245 (Tfun
246 { ft_arity = (Fstandard ()); ft_tparams = [];
247 ft_where_constraints = []; ft_params = [];
248 ft_implicit_params =
249 { capability = (CapDefaults [15:12-47]) };
250 ft_ret =
251 { et_enforced = false;
252 et_type =
253 (Rhint (root|mutable.php line 15, characters 43-43),
254 (Tapply (([15:43-44], "\\A"), [])))
256 ft_flags =
257 (make_ft_flags FSync None ~return_disposable:false
258 ~returns_mutable:true ~returns_void_to_rx:false
259 ~returns_readonly:false ~readonly_this:false
260 ~is_const:false);
261 ft_reactive = Pure {};
262 ft_ifc_decl = FDPolicied {PUBLIC} }))
264 fp_rx_annotation = None;
265 fp_flags =
266 (make_fp_flags ~mutability:None ~accept_disposable:false
267 ~has_default:false ~mode:Typing_defs_core.FPnormal
268 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
269 ~readonly:false ~const_function:false);
272 ft_implicit_params = { capability = (CapDefaults [15:10-11]) };
273 ft_ret =
274 { et_enforced = false;
275 et_type =
276 (Rhint (root|mutable.php line 15, characters 53-56),
277 (Tprim Tvoid))
279 ft_flags =
280 (make_ft_flags FSync None ~return_disposable:false
281 ~returns_mutable:false ~returns_void_to_rx:false
282 ~returns_readonly:false ~readonly_this:false ~is_const:false);
283 ft_reactive = Pure {}; ft_ifc_decl = FDPolicied {PUBLIC} }));
284 fe_pos = [15:10-11]; fe_php_std_lib = false }))
287 They matched!