Add readonly to decl and function types
[hiphop-php.git] / hphp / hack / test / decl / accept_disposable.php.exp
blobfb09dde242fd919289ee3ff51342f33cc4094087
1 [("\\Handle",
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 = ([4:7-13], "\\Handle"); sc_tparams = [];
6 sc_where_constraints = []; sc_extends = []; sc_uses = [];
7 sc_xhp_attr_uses = []; sc_req_extends = []; sc_req_implements = [];
8 sc_implements =
9 [(Rhint (root|accept_disposable.php line 4, characters 25-35),
10 (Tapply (([4:25-36], "\\IDisposable"), [])))];
11 sc_implements_dynamic = false; sc_consts = []; sc_typeconsts = [];
12 sc_props = []; sc_sprops = []; sc_constructor = None;
13 sc_static_methods = [];
14 sc_methods =
15 [{ Shallow_decl_defs.sm_name = ([5:19-28], "__dispose");
16 sm_reactivity = None;
17 sm_type =
18 (Rwitness (root|accept_disposable.php line 5, characters 19-27),
19 (Tfun
20 { ft_arity = (Fstandard ()); ft_tparams = [];
21 ft_where_constraints = []; ft_params = [];
22 ft_implicit_params = { capability = (CapDefaults [5:19-28]) };
23 ft_ret =
24 { et_enforced = false;
25 et_type =
26 (Rhint (root|accept_disposable.php line 5, characters 32-35),
27 (Tprim Tvoid))
29 ft_flags =
30 (make_ft_flags FSync None ~return_disposable:false
31 ~returns_mutable:false ~returns_void_to_rx:false
32 ~returns_readonly:false ~readonly_this:false);
33 ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC}
34 }));
35 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) };
36 { Shallow_decl_defs.sm_name = ([6:19-22], "foo");
37 sm_reactivity = None;
38 sm_type =
39 (Rwitness (root|accept_disposable.php line 6, characters 19-21),
40 (Tfun
41 { ft_arity = (Fstandard ()); ft_tparams = [];
42 ft_where_constraints = []; ft_params = [];
43 ft_implicit_params =
44 { capability = (CapDefaults [6:19-22]) };
45 ft_ret =
46 { et_enforced = false;
47 et_type =
48 (Rhint (root|accept_disposable.php line 6, characters 26-29),
49 (Tprim Tvoid))
51 ft_flags =
52 (make_ft_flags FSync None ~return_disposable:false
53 ~returns_mutable:false ~returns_void_to_rx:false
54 ~returns_readonly:false ~readonly_this:false);
55 ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC}
56 }));
57 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }
59 sc_user_attributes = []; sc_enum_type = None }));
60 ("\\f",
61 (Shallow_decl_defs.Fun
62 { Typing_defs.fe_deprecated = None;
63 fe_type =
64 (Rwitness (root|accept_disposable.php line 9, characters 10-10),
65 (Tfun
66 { ft_arity = (Fstandard ()); ft_tparams = [];
67 ft_where_constraints = [];
68 ft_params =
69 [{ fp_pos = [9:42-44]; fp_name = (Some "$h");
70 fp_type =
71 { et_enforced = false;
72 et_type =
73 (Rhint (root|accept_disposable.php line 9, characters 35-40),
74 (Tapply (([9:35-41], "\\Handle"), [])))
76 fp_rx_annotation = None;
77 fp_flags =
78 (make_fp_flags ~mutability:None ~accept_disposable:true
79 ~has_default:false ~mode:Typing_defs_core.FPnormal
80 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
81 ~readonly:false);
84 ft_implicit_params = { capability = (CapDefaults [9:10-11]) };
85 ft_ret =
86 { et_enforced = false;
87 et_type =
88 (Rhint (root|accept_disposable.php line 9, characters 47-50),
89 (Tprim Tvoid))
91 ft_flags =
92 (make_ft_flags FSync None ~return_disposable:false
93 ~returns_mutable:false ~returns_void_to_rx:false
94 ~returns_readonly:false ~readonly_this:false);
95 ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} }));
96 fe_pos = [9:10-11]; fe_php_std_lib = false }))
99 They matched!