Add readonly to decl and function types
[hiphop-php.git] / hphp / hack / test / decl / rx.php.exp
blobba6ebc6ab0c7e9f6bfde46ec004b32de09a06826
1 [("\\C",
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], "\\C"); 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 = [];
11 sc_methods =
12 [{ Shallow_decl_defs.sm_name = ([5:19-21], "f1");
13 sm_reactivity = (Some (Decl_defs.Method_reactive None));
14 sm_type =
15 (Rwitness (root|rx.php line 5, characters 19-20),
16 (Tfun
17 { ft_arity = (Fstandard ()); ft_tparams = [];
18 ft_where_constraints = [];
19 ft_params =
20 [{ fp_pos = [5:46-48]; fp_name = (Some "$f");
21 fp_type =
22 { et_enforced = false;
23 et_type =
24 (Rhint (root|rx.php line 5, characters 22-44),
25 (Tfun
26 { ft_arity = (Fstandard ()); ft_tparams = [];
27 ft_where_constraints = []; ft_params = [];
28 ft_implicit_params =
29 { capability = (CapDefaults [5:22-45]) };
30 ft_ret =
31 { et_enforced = false;
32 et_type =
33 (Rhint (root|rx.php line 5, characters 40-42),
34 (Tprim Tint))
36 ft_flags =
37 (make_ft_flags FSync None ~return_disposable:false
38 ~returns_mutable:false ~returns_void_to_rx:false
39 ~returns_readonly:false ~readonly_this:false);
40 ft_reactive = Pure {};
41 ft_ifc_decl = FDPolicied {PUBLIC} }))
43 fp_rx_annotation = None;
44 fp_flags =
45 (make_fp_flags ~mutability:None ~accept_disposable:false
46 ~has_default:false ~mode:Typing_defs_core.FPnormal
47 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
48 ~readonly:false);
51 ft_implicit_params = { capability = (CapDefaults [5:19-21]) };
52 ft_ret =
53 { et_enforced = false;
54 et_type =
55 (Rhint (root|rx.php line 5, characters 51-54),
56 (Tprim Tvoid))
58 ft_flags =
59 (make_ft_flags FSync None ~return_disposable:false
60 ~returns_mutable:false ~returns_void_to_rx:false
61 ~returns_readonly:false ~readonly_this:false);
62 ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC}
63 }));
64 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) };
65 { Shallow_decl_defs.sm_name = ([7:19-21], "f2");
66 sm_reactivity = (Some (Decl_defs.Method_reactive None));
67 sm_type =
68 (Rwitness (root|rx.php line 7, characters 19-20),
69 (Tfun
70 { ft_arity = (Fstandard ()); ft_tparams = [];
71 ft_where_constraints = [];
72 ft_params =
73 [{ fp_pos = [7:44-46]; fp_name = (Some "$f");
74 fp_type =
75 { et_enforced = false;
76 et_type =
77 (Rhint (root|rx.php line 7, characters 22-42),
78 (Tfun
79 { ft_arity = (Fstandard ()); ft_tparams = [];
80 ft_where_constraints = []; ft_params = [];
81 ft_implicit_params =
82 { capability = (CapDefaults [7:22-43]) };
83 ft_ret =
84 { et_enforced = false;
85 et_type =
86 (Rhint (root|rx.php line 7, characters 38-40),
87 (Tprim Tint))
89 ft_flags =
90 (make_ft_flags FSync None
91 ~return_disposable:false ~returns_mutable:false
92 ~returns_void_to_rx:false
93 ~returns_readonly:false ~readonly_this:false);
94 ft_reactive = Reactive {};
95 ft_ifc_decl = FDPolicied {PUBLIC} }))
97 fp_rx_annotation = None;
98 fp_flags =
99 (make_fp_flags ~mutability:None ~accept_disposable:false
100 ~has_default:false ~mode:Typing_defs_core.FPnormal
101 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
102 ~readonly:false);
105 ft_implicit_params =
106 { capability = (CapDefaults [7:19-21]) };
107 ft_ret =
108 { et_enforced = false;
109 et_type =
110 (Rhint (root|rx.php line 7, characters 49-52),
111 (Tprim Tvoid))
113 ft_flags =
114 (make_ft_flags FSync None ~return_disposable:false
115 ~returns_mutable:false ~returns_void_to_rx:false
116 ~returns_readonly:false ~readonly_this:false);
117 ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC}
118 }));
119 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) };
120 { Shallow_decl_defs.sm_name = ([9:19-21], "f3");
121 sm_reactivity = (Some (Decl_defs.Method_reactive None));
122 sm_type =
123 (Rwitness (root|rx.php line 9, characters 19-20),
124 (Tfun
125 { ft_arity = (Fstandard ()); ft_tparams = [];
126 ft_where_constraints = [];
127 ft_params =
128 [{ fp_pos = [9:51-53]; fp_name = (Some "$f");
129 fp_type =
130 { et_enforced = false;
131 et_type =
132 (Rhint (root|rx.php line 9, characters 22-49),
133 (Tfun
134 { ft_arity = (Fstandard ()); ft_tparams = [];
135 ft_where_constraints = []; ft_params = [];
136 ft_implicit_params =
137 { capability = (CapDefaults [9:22-50]) };
138 ft_ret =
139 { et_enforced = false;
140 et_type =
141 (Rhint (root|rx.php line 9, characters 45-47),
142 (Tprim Tint))
144 ft_flags =
145 (make_ft_flags FSync None
146 ~return_disposable:false ~returns_mutable:false
147 ~returns_void_to_rx:false
148 ~returns_readonly:false ~readonly_this:false);
149 ft_reactive = Shallow {};
150 ft_ifc_decl = FDPolicied {PUBLIC} }))
152 fp_rx_annotation = None;
153 fp_flags =
154 (make_fp_flags ~mutability:None ~accept_disposable:false
155 ~has_default:false ~mode:Typing_defs_core.FPnormal
156 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
157 ~readonly:false);
160 ft_implicit_params =
161 { capability = (CapDefaults [9:19-21]) };
162 ft_ret =
163 { et_enforced = false;
164 et_type =
165 (Rhint (root|rx.php line 9, characters 56-59),
166 (Tprim Tvoid))
168 ft_flags =
169 (make_ft_flags FSync None ~return_disposable:false
170 ~returns_mutable:false ~returns_void_to_rx:false
171 ~returns_readonly:false ~readonly_this:false);
172 ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC}
173 }));
174 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) };
175 { Shallow_decl_defs.sm_name = ([11:19-21], "f4");
176 sm_reactivity = (Some (Decl_defs.Method_reactive None));
177 sm_type =
178 (Rwitness (root|rx.php line 11, characters 19-20),
179 (Tfun
180 { ft_arity = (Fstandard ()); ft_tparams = [];
181 ft_where_constraints = [];
182 ft_params =
183 [{ fp_pos = [11:49-51]; fp_name = (Some "$f");
184 fp_type =
185 { et_enforced = false;
186 et_type =
187 (Rhint (root|rx.php line 11, characters 22-47),
188 (Tfun
189 { ft_arity = (Fstandard ()); ft_tparams = [];
190 ft_where_constraints = []; ft_params = [];
191 ft_implicit_params =
192 { capability = (CapDefaults [11:22-48]) };
193 ft_ret =
194 { et_enforced = false;
195 et_type =
196 (Rhint (root|rx.php line 11, characters 43-45),
197 (Tprim Tint))
199 ft_flags =
200 (make_ft_flags FSync None
201 ~return_disposable:false ~returns_mutable:false
202 ~returns_void_to_rx:false
203 ~returns_readonly:false ~readonly_this:false);
204 ft_reactive = Local {};
205 ft_ifc_decl = FDPolicied {PUBLIC} }))
207 fp_rx_annotation = None;
208 fp_flags =
209 (make_fp_flags ~mutability:None ~accept_disposable:false
210 ~has_default:false ~mode:Typing_defs_core.FPnormal
211 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
212 ~readonly:false);
215 ft_implicit_params =
216 { capability = (CapDefaults [11:19-21]) };
217 ft_ret =
218 { et_enforced = false;
219 et_type =
220 (Rhint (root|rx.php line 11, characters 54-57),
221 (Tprim Tvoid))
223 ft_flags =
224 (make_ft_flags FSync None ~return_disposable:false
225 ~returns_mutable:false ~returns_void_to_rx:false
226 ~returns_readonly:false ~readonly_this:false);
227 ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC}
228 }));
229 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }
231 sc_user_attributes = []; sc_enum_type = None }))
234 They matched!