Enforce Pos_or_decl.t in reasons for decl types
[hiphop-php.git] / hphp / hack / test / decl / classes_typeconst.php.exp
blob47dd6e7cd27efaad8934932643b263385585d18e
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 = ([4: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 =
10 [{ Shallow_decl_defs.stc_abstract = Typing_defs.TCConcrete;
11 stc_as_constraint = None; stc_name = ([5:14-15], "T");
12 stc_type = (Some (Rhint ([5:18-21]), (Tprim Tint)));
13 stc_enforceable = ([Pos.none], false); stc_reifiable = None };
14 { Shallow_decl_defs.stc_abstract = Typing_defs.TCConcrete;
15 stc_as_constraint = None; stc_name = ([15:14-16], "T2");
16 stc_type = (Some (Rhint ([15:19-25]), (Tprim Tstring)));
17 stc_enforceable = ([Pos.none], false); stc_reifiable = None }
19 sc_props = []; sc_sprops = []; sc_constructor = None;
20 sc_static_methods = [];
21 sc_methods =
22 [{ Shallow_decl_defs.sm_name = ([7:19-20], "f");
23 sm_type =
24 (Rwitness_from_decl ([7:19-20]),
25 (Tfun
26 { ft_arity = (Fstandard ()); ft_tparams = [];
27 ft_where_constraints = []; ft_params = [];
28 ft_implicit_params = { capability = (CapDefaults [7:19-20]) };
29 ft_ret =
30 { et_enforced = false;
31 et_type =
32 (Rhint ([7:24-31]),
33 (Taccess ((Rhint ([7:24-31]), Tthis), [([7:30-31], "T")])))
35 ft_flags =
36 (make_ft_flags FSync ~return_disposable:false
37 ~returns_readonly:false ~readonly_this:false
38 ~is_const:false);
39 ft_ifc_decl = FDPolicied {PUBLIC} }));
40 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) };
41 { Shallow_decl_defs.sm_name = ([11:19-20], "g");
42 sm_type =
43 (Rwitness_from_decl ([11:19-20]),
44 (Tfun
45 { ft_arity = (Fstandard ()); ft_tparams = [];
46 ft_where_constraints = []; ft_params = [];
47 ft_implicit_params =
48 { capability = (CapDefaults [11:19-20]) };
49 ft_ret =
50 { et_enforced = false;
51 et_type =
52 (Rhint ([11:24-32]),
53 (Taccess
54 ((Rhint ([11:24-32]), Tthis), [([11:30-32], "T2")])))
56 ft_flags =
57 (make_ft_flags FSync ~return_disposable:false
58 ~returns_readonly:false ~readonly_this:false
59 ~is_const:false);
60 ft_ifc_decl = FDPolicied {PUBLIC} }));
61 sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }
63 sc_user_attributes = []; sc_enum_type = None }));
64 ("\\C2",
65 (Shallow_decl_defs.Class
66 { Shallow_decl_defs.sc_mode = Mstrict; sc_final = false;
67 sc_is_xhp = false; sc_has_xhp_keyword = false; sc_kind = Cabstract;
68 sc_name = ([18:16-18], "\\C2"); sc_tparams = [];
69 sc_where_constraints = []; sc_extends = []; sc_uses = [];
70 sc_xhp_attr_uses = []; sc_req_extends = []; sc_req_implements = [];
71 sc_implements = []; sc_implements_dynamic = false; sc_consts = [];
72 sc_typeconsts =
73 [{ Shallow_decl_defs.stc_abstract = (Typing_defs.TCAbstract None);
74 stc_as_constraint =
75 (Some (Rhint ([19:37-38]), (Tapply (([19:37-38], "\\C"), []))));
76 stc_name = ([19:23-33], "TConstType"); stc_type = None;
77 stc_enforceable = ([Pos.none], false); stc_reifiable = None }
79 sc_props = []; sc_sprops = []; sc_constructor = None;
80 sc_static_methods = [];
81 sc_methods =
82 [{ Shallow_decl_defs.sm_name = ([20:28-39], "instantiate");
83 sm_type =
84 (Rwitness_from_decl ([20:28-39]),
85 (Tfun
86 { ft_arity = (Fstandard ()); ft_tparams = [];
87 ft_where_constraints = [];
88 ft_params =
89 [{ fp_pos = [20:60-68]; fp_name = (Some "$request");
90 fp_type =
91 { et_enforced = false;
92 et_type =
93 (Rhint ([20:40-59]),
94 (Taccess
95 ((Rhint ([20:40-59]),
96 (Taccess
97 ((Rhint ([20:40-59]), Tthis),
98 [([20:46-56], "TConstType")]))),
99 [([20:58-59], "T")])))
101 fp_flags =
102 (make_fp_flags ~accept_disposable:false
103 ~has_default:false ~mode:Typing_defs_core.FPnormal
104 ~ifc_external:false ~ifc_can_call:false ~is_atom:false
105 ~readonly:false ~const_function:false);
108 ft_implicit_params =
109 { capability = (CapDefaults [20:28-39]) };
110 ft_ret =
111 { et_enforced = false;
112 et_type =
113 (Rhint ([20:71-87]),
114 (Taccess
115 ((Rhint ([20:71-87]), Tthis),
116 [([20:77-87], "TConstType")])))
118 ft_flags =
119 (make_ft_flags FSync ~return_disposable:false
120 ~returns_readonly:false ~readonly_this:false
121 ~is_const:false);
122 ft_ifc_decl = FDPolicied {PUBLIC} }));
123 sm_visibility = Public; sm_deprecated = None; sm_flags = abstract
126 sc_user_attributes = []; sc_enum_type = None }))
129 They matched!