Updating submodules
[hiphop-php.git] / hphp / hack / test / nast / expression_tree_for.php.exp
blob48912e5e7a5cab0d4778db7261511ebff88edb50
1 [(Fun
2 { fd_namespace =
3 { Namespace_env.ns_ns_uses = <opaque>; ns_class_uses = <opaque>;
4 ns_fun_uses = <opaque>; ns_const_uses = <opaque>; ns_name = None;
5 ns_mode = Namespace_env.ForTypecheck; ns_disable_xhp_element_mangling = false };
6 fd_file_attributes = []; fd_mode = Mstrict; fd_name = ([3:10-14], "\\test");
7 fd_fun =
8 { f_span = [3:1-9:2]; f_readonly_this = None; f_annotation = ();
9 f_readonly_ret = None; f_ret = ((), (Some ([3:18-22], (Hprim Tvoid))));
10 f_params = []; f_ctxs = None; f_unsafe_ctxs = None;
11 f_body =
12 { fb_ast =
13 [([4:3-8:6],
14 (Expr
15 ((), [4:3-8:5],
16 (ExpressionTree
17 { et_class = ([4:3-13], "\\ExampleDsl");
18 et_runtime_expr =
19 ((), [4:14-8:4],
20 (Call
21 { func =
22 ((), [4:14-8:4],
23 (Lfun (
24 { f_span = [4:14-8:4]; f_readonly_this = None;
25 f_annotation = (); f_readonly_ret = None;
26 f_ret = ((), None); f_params = []; f_ctxs = None;
27 f_unsafe_ctxs = None;
28 f_body =
29 { fb_ast =
30 [([6:7-10],
31 (Expr
32 ((), [6:7-10],
33 (Binop { bop = (Eq None); lhs = ((), [6:7-10], (Lvar ([6:7-10], $0fp0))); rhs = ((), [6:7-10], (FunctionPointer ((FP_id ([6:7-10], "\\foo")), []))) }))));
34 ([4:14-8:4],
35 (Return
36 (Some ((), [4:3-13],
37 (Call
38 { func = ((), [4:3-13], (Class_const (((), [4:3-13], (CI ([4:3-13], "\\ExampleDsl"))), ([4:3-13], "makeTree"))));
39 targs = [];
40 args =
41 [(Pnormal,
42 ((), [4:14-8:4],
43 (Shape
44 [((SFlit_str ([4:14-8:4], "path")), ((), [4:14-8:4], (Id ([4:14-8:4], "\\__FILE__"))));
45 ((SFlit_str ([4:14-8:4], "start_line")), ((), [4:14-8:4], (Int "4")));
46 ((SFlit_str ([4:14-8:4], "end_line")), ((), [4:14-8:4], (Int "8")));
47 ((SFlit_str ([4:14-8:4], "start_column")), ((), [4:14-8:4], (Int "13")));
48 ((SFlit_str ([4:14-8:4], "end_column")), ((), [4:14-8:4], (Int "3")))])));
49 (Pnormal,
50 ((), [4:3-13],
51 (Shape
52 [((SFlit_str ([4:3-13], "splices")), ((), [4:3-13], (KeyValCollection (([4:3-13], Dict), None, []))));
53 ((SFlit_str ([4:3-13], "functions")), ((), [4:3-13], (ValCollection (([4:3-13], Vec), None, [((), [6:7-10], (Lvar ([6:7-10], $0fp0)))]))));
54 ((SFlit_str ([4:3-13], "static_methods")), ((), [4:3-13], (ValCollection (([4:3-13], Vec), None, []))));
55 ((SFlit_str ([4:3-13], "type")),
56 ((), [4:14-8:4],
57 (Efun
58 { ef_fun =
59 { f_span = [4:14-8:4];
60 f_readonly_this = None;
61 f_annotation = ();
62 f_readonly_ret = None;
63 f_ret = ((), None);
64 f_params = [];
65 f_ctxs = (Some ([4:14-8:4], [([4:14-8:4], (Happly (([4:14-8:4], "\\HH\\Contexts\\defaults"), [])))]));
66 f_unsafe_ctxs = None;
67 f_body =
68 { fb_ast =
69 [([4:14-8:4],
70 (Return
71 (Some (
72 (), [4:14-8:4],
74 Call
75 { func = ((), [4:14-8:4], (Class_const (((), [4:14-8:4], (CI ([4:14-8:4], "\\ExampleDsl"))), ([4:14-8:4], "lambdaType"))));
76 targs = [];
77 args =
78 [(Pnormal,
79 ((), [4:14-8:4],
80 (Lfun (
81 { f_span = [4:14-8:4];
82 f_readonly_this = None;
83 f_annotation = ();
84 f_readonly_ret = None;
85 f_ret = ((), None);
86 f_params = [];
87 f_ctxs = None;
88 f_unsafe_ctxs = None;
89 f_body =
90 { fb_ast =
91 [([5:5-7:6],
92 (For (
93 [((), [5:10-16],
94 (Binop
95 { bop = (Eq None);
96 lhs = ((), [5:10-12], (Lvar ([5:10-12], $i)));
97 rhs =
99 (), [5:15-16],
101 Call
102 { func = ((), [5:15-16], (Class_const (((), [5:15-16], (CI ([5:15-16], "\\ExampleDsl"))), ([5:15-16], "intType"))));
103 targs = [];
104 args = [];
105 unpacked_arg = None })) }))],
106 (Some (
107 (), [5:18-22],
109 Call
110 { func =
111 ((), [5:18-22],
112 (Obj_get (
113 ((), [5:18-22],
114 (Call
115 { func = ((), [5:18-22], (Class_const (((), [5:18-22], (CI ([5:18-22], "\\ExampleDsl"))), ([5:18-22], "boolType"))));
116 targs = [];
117 args = [];
118 unpacked_arg = None })), (
119 (), [5:18-22], (Id ([5:18-22], "__bool"))), OG_nullthrows, Is_method)));
120 targs = [];
121 args = [];
122 unpacked_arg = None }))),
123 [((), [5:24-35],
124 (Binop
125 { bop = (Eq None);
126 lhs = ((), [5:24-26], (Lvar ([5:24-26], $i)));
127 rhs =
129 (), [5:29-35],
131 Call
132 { func =
133 ((), [5:29-35],
134 (Obj_get (((), [5:29-31], (Lvar ([5:29-31], $i))), ((), [5:29-35], (Id ([5:29-35], "__plus"))), OG_nullthrows, Is_method)));
135 targs = [];
136 args =
137 [(Pnormal,
138 ((), [5:34-35],
139 (Call
140 { func = ((), [5:34-35], (Class_const (((), [5:34-35], (CI ([5:34-35], "\\ExampleDsl"))), ([5:34-35], "intType"))));
141 targs = [];
142 args = [];
143 unpacked_arg = None })))];
144 unpacked_arg = None })) }))],
145 [([6:7-13],
146 (Expr
147 ((), [6:7-12],
148 (Call
149 { func =
150 ((), [6:7-12],
151 (Call
152 { func =
153 ((), [6:7-12],
154 (Obj_get (
155 ((), [6:7-12],
156 (Call
157 { func = ((), [6:7-12], (Class_const (((), [6:7-12], (CI ([6:7-12], "\\ExampleDsl"))), ([6:7-12], "symbolType"))));
158 targs = [];
159 args = [(Pnormal, ((), [6:7-10], (Lvar ([6:7-10], $0fp0))))];
160 unpacked_arg = None })), (
161 (), [6:7-12], (Id ([6:7-12], "__unwrap"))), OG_nullthrows, Is_method)));
162 targs = [];
163 args = [];
164 unpacked_arg = None }));
165 targs = [];
166 args = [];
167 unpacked_arg = None }))))])));
168 ([4:14-8:4],
169 (Return
170 (Some (
171 (), [4:14-8:4],
173 Call
174 { func = ((), [4:14-8:4], (Class_const (((), [4:14-8:4], (CI ([4:14-8:4], "\\ExampleDsl"))), ([4:14-8:4], "voidType"))));
175 targs = [];
176 args = [];
177 unpacked_arg = None })))))] };
178 f_fun_kind = FSync;
179 f_user_attributes = [];
180 f_external = false;
181 f_doc_comment = None },
182 [((), ([6:7-10], $0fp0))]))))];
183 unpacked_arg = None })))))] };
184 f_fun_kind = FSync;
185 f_user_attributes = [];
186 f_external = false;
187 f_doc_comment = None };
188 ef_use = [((), ([4:3-13], $0fp0))];
189 ef_closure_class_name = None })))
190 ])));
191 (Pnormal,
192 ((), [4:14-8:4],
193 (Lfun (
194 { f_span = [4:14-8:4];
195 f_readonly_this = None;
196 f_annotation = ();
197 f_readonly_ret = None;
198 f_ret = ((), None);
199 f_params =
200 [{ param_annotation = ();
201 param_type_hint = ((), (Some ([4:3-13], (Happly (([4:3-13], "\\ExampleDsl"), [])))));
202 param_pos = [4:3-13];
203 param_name = "$0v";
204 param_info = Param_required;
205 param_readonly = None;
206 param_callconv = Pnormal;
207 param_user_attributes = [];
208 param_visibility = None }
210 f_ctxs = None;
211 f_unsafe_ctxs = None;
212 f_body =
213 { fb_ast =
214 [([4:14-8:4],
215 (Return
216 (Some (
217 (), [4:14-8:4],
219 Call
220 { func =
221 ((), [4:14-8:4],
222 (Obj_get ((
223 (), [4:14-8:4], (Lvar ([4:14-8:4], $0v))), (
224 (), [4:14-8:4], (Id ([4:14-8:4], "visitLambda"))), OG_nullthrows, Is_method)));
225 targs = [];
226 args =
227 [(Pnormal,
228 ((), [4:14-8:4],
229 (Shape
230 [((SFlit_str ([4:14-8:4], "path")), ((), [4:14-8:4], (Id ([4:14-8:4], "\\__FILE__"))));
231 ((SFlit_str ([4:14-8:4], "start_line")), ((), [4:14-8:4], (Int "4")));
232 ((SFlit_str ([4:14-8:4], "end_line")), ((), [4:14-8:4], (Int "8")));
233 ((SFlit_str ([4:14-8:4], "start_column")), ((), [4:14-8:4], (Int "13")));
234 ((SFlit_str ([4:14-8:4], "end_column")), ((), [4:14-8:4], (Int "3")))])));
235 (Pnormal, ((), [Pos.none], (ValCollection (([Pos.none], Vec), None, []))));
236 (Pnormal,
237 ((), [5:5-7:6],
238 (ValCollection ((
239 [5:5-7:6], Vec), None,
240 [((), [5:5-7:6],
241 (Call
242 { func =
243 ((), [5:5-7:6],
244 (Obj_get (((), [5:5-7:6], (Lvar ([5:5-7:6], $0v))), ((), [5:5-7:6], (Id ([5:5-7:6], "visitFor"))), OG_nullthrows, Is_method)));
245 targs = [];
246 args =
247 [(Pnormal,
248 ((), [5:5-7:6],
249 (Shape
250 [((SFlit_str ([5:5-7:6], "path")), ((), [5:5-7:6], (Id ([5:5-7:6], "\\__FILE__"))));
251 ((SFlit_str ([5:5-7:6], "start_line")), ((), [5:5-7:6], (Int "5")));
252 ((SFlit_str ([5:5-7:6], "end_line")), ((), [5:5-7:6], (Int "7")));
253 ((SFlit_str ([5:5-7:6], "start_column")), ((), [5:5-7:6], (Int "4")));
254 ((SFlit_str ([5:5-7:6], "end_column")), ((), [5:5-7:6], (Int "5")))])));
255 (Pnormal,
256 ((), [5:10-16],
257 (ValCollection ((
258 [5:10-16], Vec), None,
259 [((), [5:10-16],
260 (Call
261 { func =
262 ((), [5:10-16],
263 (Obj_get (((), [5:10-16], (Lvar ([5:10-16], $0v))), ((), [5:10-16], (Id ([5:10-16], "visitAssign"))), OG_nullthrows, Is_method)));
264 targs = [];
265 args =
266 [(Pnormal,
267 ((), [5:10-16],
268 (Shape
269 [((SFlit_str ([5:10-16], "path")), ((), [5:10-16], (Id ([5:10-16], "\\__FILE__"))));
270 ((SFlit_str ([5:10-16], "start_line")), ((), [5:10-16], (Int "5")));
271 ((SFlit_str ([5:10-16], "end_line")), ((), [5:10-16], (Int "5")));
272 ((SFlit_str ([5:10-16], "start_column")), ((), [5:10-16], (Int "9")));
273 ((SFlit_str ([5:10-16], "end_column")), ((), [5:10-16], (Int "15")))])));
274 (Pnormal,
275 ((), [5:10-12],
276 (Call
277 { func =
278 ((), [5:10-12],
279 (Obj_get (((), [5:10-12], (Lvar ([5:10-12], $0v))), ((), [5:10-12], (Id ([5:10-12], "visitLocal"))), OG_nullthrows, Is_method)));
280 targs = [];
281 args =
282 [(Pnormal,
283 ((), [5:10-12],
284 (Shape
285 [((SFlit_str ([5:10-12], "path")), ((), [5:10-12], (Id ([5:10-12], "\\__FILE__"))));
286 ((SFlit_str ([5:10-12], "start_line")), ((), [5:10-12], (Int "5")));
287 ((SFlit_str ([5:10-12], "end_line")), ((), [5:10-12], (Int "5")));
288 ((SFlit_str ([5:10-12], "start_column")), ((), [5:10-12], (Int "9")));
289 ((SFlit_str ([5:10-12], "end_column")), ((), [5:10-12], (Int "11")))]))); (
290 Pnormal, ((), [5:10-12], (String "$i")))];
291 unpacked_arg = None })));
292 (Pnormal,
293 ((), [5:15-16],
294 (Call
295 { func =
296 ((), [5:15-16],
297 (Obj_get (((), [5:15-16], (Lvar ([5:15-16], $0v))), ((), [5:15-16], (Id ([5:15-16], "visitInt"))), OG_nullthrows, Is_method)));
298 targs = [];
299 args =
300 [(Pnormal,
301 ((), [5:15-16],
302 (Shape
303 [((SFlit_str ([5:15-16], "path")), ((), [5:15-16], (Id ([5:15-16], "\\__FILE__"))));
304 ((SFlit_str ([5:15-16], "start_line")), ((), [5:15-16], (Int "5")));
305 ((SFlit_str ([5:15-16], "end_line")), ((), [5:15-16], (Int "5")));
306 ((SFlit_str ([5:15-16], "start_column")), ((), [5:15-16], (Int "14")));
307 ((SFlit_str ([5:15-16], "end_column")), ((), [5:15-16], (Int "15")))]))); (
308 Pnormal, ((), [5:15-16], (Int "0")))];
309 unpacked_arg = None })))];
310 unpacked_arg = None }))]))));
311 (Pnormal,
312 ((), [5:18-22],
313 (Call
314 { func =
315 ((), [5:18-22],
316 (Obj_get (((), [5:18-22], (Lvar ([5:18-22], $0v))), ((), [5:18-22], (Id ([5:18-22], "visitBool"))), OG_nullthrows, Is_method)));
317 targs = [];
318 args =
319 [(Pnormal,
320 ((), [5:18-22],
321 (Shape
322 [((SFlit_str ([5:18-22], "path")), ((), [5:18-22], (Id ([5:18-22], "\\__FILE__"))));
323 ((SFlit_str ([5:18-22], "start_line")), ((), [5:18-22], (Int "5")));
324 ((SFlit_str ([5:18-22], "end_line")), ((), [5:18-22], (Int "5")));
325 ((SFlit_str ([5:18-22], "start_column")), ((), [5:18-22], (Int "17")));
326 ((SFlit_str ([5:18-22], "end_column")), ((), [5:18-22], (Int "21")))]))); (
327 Pnormal, ((), [5:18-22], True))];
328 unpacked_arg = None })));
329 (Pnormal,
330 ((), [5:24-35],
331 (ValCollection ((
332 [5:24-35], Vec), None,
333 [((), [5:24-35],
334 (Call
335 { func =
336 ((), [5:24-35],
337 (Obj_get (((), [5:24-35], (Lvar ([5:24-35], $0v))), ((), [5:24-35], (Id ([5:24-35], "visitAssign"))), OG_nullthrows, Is_method)));
338 targs = [];
339 args =
340 [(Pnormal,
341 ((), [5:24-35],
342 (Shape
343 [((SFlit_str ([5:24-35], "path")), ((), [5:24-35], (Id ([5:24-35], "\\__FILE__"))));
344 ((SFlit_str ([5:24-35], "start_line")), ((), [5:24-35], (Int "5")));
345 ((SFlit_str ([5:24-35], "end_line")), ((), [5:24-35], (Int "5")));
346 ((SFlit_str ([5:24-35], "start_column")), ((), [5:24-35], (Int "23")));
347 ((SFlit_str ([5:24-35], "end_column")), ((), [5:24-35], (Int "34")))])));
348 (Pnormal,
349 ((), [5:24-26],
350 (Call
351 { func =
352 ((), [5:24-26],
353 (Obj_get (((), [5:24-26], (Lvar ([5:24-26], $0v))), ((), [5:24-26], (Id ([5:24-26], "visitLocal"))), OG_nullthrows, Is_method)));
354 targs = [];
355 args =
356 [(Pnormal,
357 ((), [5:24-26],
358 (Shape
359 [((SFlit_str ([5:24-26], "path")), ((), [5:24-26], (Id ([5:24-26], "\\__FILE__"))));
360 ((SFlit_str ([5:24-26], "start_line")), ((), [5:24-26], (Int "5")));
361 ((SFlit_str ([5:24-26], "end_line")), ((), [5:24-26], (Int "5")));
362 ((SFlit_str ([5:24-26], "start_column")), ((), [5:24-26], (Int "23")));
363 ((SFlit_str ([5:24-26], "end_column")), ((), [5:24-26], (Int "25")))]))); (
364 Pnormal, ((), [5:24-26], (String "$i")))];
365 unpacked_arg = None })));
366 (Pnormal,
367 ((), [5:29-35],
368 (Call
369 { func =
370 ((), [5:29-35],
371 (Obj_get (((), [5:29-35], (Lvar ([5:29-35], $0v))), ((), [5:29-35], (Id ([5:29-35], "visitBinop"))), OG_nullthrows, Is_method)));
372 targs = [];
373 args =
374 [(Pnormal,
375 ((), [5:29-35],
376 (Shape
377 [((SFlit_str ([5:29-35], "path")), ((), [5:29-35], (Id ([5:29-35], "\\__FILE__"))));
378 ((SFlit_str ([5:29-35], "start_line")), ((), [5:29-35], (Int "5")));
379 ((SFlit_str ([5:29-35], "end_line")), ((), [5:29-35], (Int "5")));
380 ((SFlit_str ([5:29-35], "start_column")), ((), [5:29-35], (Int "28")));
381 ((SFlit_str ([5:29-35], "end_column")), ((), [5:29-35], (Int "34")))])));
382 (Pnormal,
383 ((), [5:29-31],
384 (Call
385 { func =
386 ((), [5:29-31],
387 (Obj_get (((), [5:29-31], (Lvar ([5:29-31], $0v))), ((), [5:29-31], (Id ([5:29-31], "visitLocal"))), OG_nullthrows, Is_method)));
388 targs = [];
389 args =
390 [(Pnormal,
391 ((), [5:29-31],
392 (Shape
393 [((SFlit_str ([5:29-31], "path")), ((), [5:29-31], (Id ([5:29-31], "\\__FILE__"))));
394 ((SFlit_str ([5:29-31], "start_line")), ((), [5:29-31], (Int "5")));
395 ((SFlit_str ([5:29-31], "end_line")), ((), [5:29-31], (Int "5")));
396 ((SFlit_str ([5:29-31], "start_column")), ((), [5:29-31], (Int "28")));
397 ((SFlit_str ([5:29-31], "end_column")), ((), [5:29-31], (Int "30")))]))); (
398 Pnormal, ((), [5:29-31], (String "$i")))];
399 unpacked_arg = None }))); (
400 Pnormal, ((), [5:29-35], (String "__plus")));
401 (Pnormal,
402 ((), [5:34-35],
403 (Call
404 { func =
405 ((), [5:34-35],
406 (Obj_get (((), [5:34-35], (Lvar ([5:34-35], $0v))), ((), [5:34-35], (Id ([5:34-35], "visitInt"))), OG_nullthrows, Is_method)));
407 targs = [];
408 args =
409 [(Pnormal,
410 ((), [5:34-35],
411 (Shape
412 [((SFlit_str ([5:34-35], "path")), ((), [5:34-35], (Id ([5:34-35], "\\__FILE__"))));
413 ((SFlit_str ([5:34-35], "start_line")), ((), [5:34-35], (Int "5")));
414 ((SFlit_str ([5:34-35], "end_line")), ((), [5:34-35], (Int "5")));
415 ((SFlit_str ([5:34-35], "start_column")), ((), [5:34-35], (Int "33")));
416 ((SFlit_str ([5:34-35], "end_column")), ((), [5:34-35], (Int "34")))]))); (
417 Pnormal, ((), [5:34-35], (Int "1")))];
418 unpacked_arg = None })))];
419 unpacked_arg = None })))];
420 unpacked_arg = None }))]))));
421 (Pnormal,
422 ((), [6:7-12],
423 (ValCollection ((
424 [6:7-12], Vec), None,
425 [((), [6:7-12],
426 (Call
427 { func =
428 ((), [6:7-12],
429 (Obj_get (((), [6:7-12], (Lvar ([6:7-12], $0v))), ((), [6:7-12], (Id ([6:7-12], "visitCall"))), OG_nullthrows, Is_method)));
430 targs = [];
431 args =
432 [(Pnormal,
433 ((), [6:7-12],
434 (Shape
435 [((SFlit_str ([6:7-12], "path")), ((), [6:7-12], (Id ([6:7-12], "\\__FILE__"))));
436 ((SFlit_str ([6:7-12], "start_line")), ((), [6:7-12], (Int "6"))); (
437 (SFlit_str ([6:7-12], "end_line")), ((), [6:7-12], (Int "6")));
438 ((SFlit_str ([6:7-12], "start_column")), ((), [6:7-12], (Int "6")));
439 ((SFlit_str ([6:7-12], "end_column")), ((), [6:7-12], (Int "11")))])));
440 (Pnormal,
441 ((), [6:7-12],
442 (Call
443 { func =
444 ((), [6:7-12],
445 (Obj_get ((
446 (), [6:7-12], (Lvar ([6:7-12], $0v))), (
447 (), [6:7-12], (Id ([6:7-12], "visitGlobalFunction"))), OG_nullthrows, Is_method)));
448 targs = [];
449 args =
450 [(Pnormal,
451 ((), [6:7-12],
452 (Shape
453 [((SFlit_str ([6:7-12], "path")), ((), [6:7-12], (Id ([6:7-12], "\\__FILE__"))));
454 ((SFlit_str ([6:7-12], "start_line")), ((), [6:7-12], (Int "6"))); (
455 (SFlit_str ([6:7-12], "end_line")), ((), [6:7-12], (Int "6")));
456 ((SFlit_str ([6:7-12], "start_column")), ((), [6:7-12], (Int "6")));
457 ((SFlit_str ([6:7-12], "end_column")), ((), [6:7-12], (Int "11")))]))); (
458 Pnormal, ((), [6:7-10], (Lvar ([6:7-10], $0fp0))))];
459 unpacked_arg = None }))); (
460 Pnormal, ((), [Pos.none], (ValCollection (([Pos.none], Vec), None, []))))];
461 unpacked_arg = None }))]))))];
462 unpacked_arg = None }))]))))];
463 unpacked_arg = None })))))
466 f_fun_kind = FSync;
467 f_user_attributes = [];
468 f_external = false;
469 f_doc_comment = None },
470 [((), ([6:7-10], $0fp0))]))))
472 unpacked_arg = None })))))
475 f_fun_kind = FSync; f_user_attributes = [];
476 f_external = false; f_doc_comment = None },
477 [((), ([6:7-10], $0fp0))])));
478 targs = []; args = []; unpacked_arg = None }))
479 }))))
482 f_fun_kind = FSync; f_user_attributes = [{ ua_name = ([3:10-14], "__SupportDynamicType"); ua_params = [] }];
483 f_external = false; f_doc_comment = None };
484 fd_internal = false; fd_module = None; fd_tparams = []; fd_where_constraints = [] })