Add readonly to decl and function types
[hiphop-php.git] / hphp / hack / test / decl / hhi.hhi.exp
blob4a9528db51d72c09c37bec6a7c395f6474b55f35
1 [("\\X",
2 (Shallow_decl_defs.Typedef
3 { Typing_defs.td_pos = [3:6-7]; td_vis = Transparent; td_tparams = [];
4 td_constraint = None;
5 td_type =
6 (Rhint (root|hhi.hhi line 3, characters 10-12), (Tprim Tint)) }));
7 ("\\Y",
8 (Shallow_decl_defs.Const
9 { Typing_defs.cd_pos = [5:11-12];
10 cd_type = (Rhint (root|hhi.hhi line 5, characters 7-9), (Tprim Tint))
11 }));
12 ("\\f",
13 (Shallow_decl_defs.Fun
14 { Typing_defs.fe_deprecated = None;
15 fe_type =
16 (Rwitness (root|hhi.hhi line 7, characters 10-10),
17 (Tfun
18 { ft_arity = (Fstandard ()); ft_tparams = [];
19 ft_where_constraints = [];
20 ft_params =
21 [{ fp_pos = [7:19-21]; fp_name = (Some "$s");
22 fp_type =
23 { et_enforced = false;
24 et_type =
25 (Rhint (root|hhi.hhi line 7, characters 12-17),
26 (Tprim Tstring))
28 fp_rx_annotation = None;
29 fp_flags =
30 (make_fp_flags ~mutability:None ~accept_disposable:false
31 ~has_default:false ~mode:Typing_defs_core.FPnormal
32 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
33 ~readonly:false);
36 ft_implicit_params = { capability = (CapDefaults [7:10-11]) };
37 ft_ret =
38 { et_enforced = false;
39 et_type =
40 (Rhint (root|hhi.hhi line 7, characters 24-26), (Tprim Tint))
42 ft_flags =
43 (make_ft_flags FSync None ~return_disposable:false
44 ~returns_mutable:false ~returns_void_to_rx:false
45 ~returns_readonly:false ~readonly_this:false);
46 ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} }));
47 fe_pos = [7:10-11]; fe_php_std_lib = false }));
48 ("\\C",
49 (Shallow_decl_defs.Class
50 { Shallow_decl_defs.sc_mode = Mhhi; sc_final = false;
51 sc_is_xhp = false; sc_has_xhp_keyword = false; sc_kind = Cnormal;
52 sc_name = ([9:7-8], "\\C"); sc_tparams = [];
53 sc_where_constraints = []; sc_extends = []; sc_uses = [];
54 sc_xhp_attr_uses = []; sc_req_extends = []; sc_req_implements = [];
55 sc_implements = []; sc_implements_dynamic = false; sc_consts = [];
56 sc_typeconsts = []; sc_props = []; sc_sprops = [];
57 sc_constructor = None; sc_static_methods = [];
58 sc_methods =
59 [{ Shallow_decl_defs.sm_name = ([10:19-20], "g");
60 sm_reactivity = None;
61 sm_type =
62 (Rwitness (root|hhi.hhi line 10, characters 19-19),
63 (Tfun
64 { ft_arity = (Fstandard ()); ft_tparams = [];
65 ft_where_constraints = [];
66 ft_params =
67 [{ fp_pos = [10:23-25]; fp_name = (Some "$x");
68 fp_type =
69 { et_enforced = false;
70 et_type =
71 (Rhint (root|hhi.hhi line 10, characters 21-21),
72 (Tapply (([10:21-22], "\\X"), [])))
74 fp_rx_annotation = None;
75 fp_flags =
76 (make_fp_flags ~mutability:None ~accept_disposable:false
77 ~has_default:false ~mode:Typing_defs_core.FPnormal
78 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
79 ~readonly:false);
82 ft_implicit_params =
83 { capability = (CapDefaults [10:19-20]) };
84 ft_ret =
85 { et_enforced = false;
86 et_type =
87 (Rhint (root|hhi.hhi line 10, characters 28-30),
88 (Tprim Tint))
90 ft_flags =
91 (make_ft_flags FSync None ~return_disposable:false
92 ~returns_mutable:false ~returns_void_to_rx:false
93 ~returns_readonly:false ~readonly_this:false);
94 ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC}
95 }));
96 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }
98 sc_user_attributes = []; sc_enum_type = None }))
101 They matched!