From 2cbea9c18bf51f97846358bb70e2385dbe2fd71d Mon Sep 17 00:00:00 2001 From: James Wu Date: Wed, 10 Feb 2021 20:59:25 -0800 Subject: [PATCH] Add readonly to decl and function types Summary: Add readonlyness to decl and function types, so we can consume it in the typechecker. Reviewed By: zilberstein Differential Revision: D26318430 fbshipit-source-id: ee2619b16a3e81a2bc206dc6e1a2cacae4839389 --- hphp/hack/src/decl/decl_folded_class.ml | 12 +- hphp/hack/src/decl/decl_fun_utils.ml | 6 +- hphp/hack/src/decl/decl_hint.ml | 10 +- hphp/hack/src/decl/decl_nast.ml | 5 +- hphp/hack/src/decl/decl_to_typing.ml | 7 +- .../src/decl/direct_decl_smart_constructors.rs | 29 +++- hphp/hack/src/decl/shallow_decl.ml | 10 +- hphp/hack/src/decl/shallow_decl_defs.ml | 7 + hphp/hack/src/decl/shallow_decl_defs.mli | 5 + hphp/hack/src/oxidized_by_ref/manual/prop_flags.rs | 1 + .../oxidized_by_ref/manual/typing_defs_flags.rs | 12 +- .../type_serialization_identity_check.ml | 3 +- hphp/hack/src/typing/typing.ml | 3 + hphp/hack/src/typing/typing_defs.ml | 6 +- hphp/hack/src/typing/typing_defs_core.ml | 36 ++++- hphp/hack/src/typing/typing_defs_core.mli | 9 ++ hphp/hack/src/typing/typing_defs_flags.ml | 9 ++ hphp/hack/src/typing/typing_extends.ml | 3 +- hphp/hack/src/typing/typing_print.ml | 3 +- hphp/hack/src/typing/typing_utils.ml | 3 +- hphp/hack/test/decl/abstract_method.php.exp | 3 +- hphp/hack/test/decl/accept_disposable.php.exp | 12 +- hphp/hack/test/decl/array_typehints.php.exp | 27 ++-- .../decl/async_and_generator_functions.php.exp | 15 +- hphp/hack/test/decl/at_most_rx_as_func.php.exp | 14 +- .../at_most_rx_as_func_with_optional_func.php.exp | 11 +- hphp/hack/test/decl/atom.php.exp | 6 +- hphp/hack/test/decl/auto_ns_use.php.exp | 12 +- hphp/hack/test/decl/cipp.php.exp | 24 ++-- hphp/hack/test/decl/class_in_namespace.php.exp | 3 +- hphp/hack/test/decl/classes.php.exp | 54 +++++--- .../test/decl/classes_consistent_construct.php.exp | 5 +- .../decl/classes_inferred_constant_types.php.exp | 3 +- hphp/hack/test/decl/classes_inheritance.php.exp | 24 ++-- hphp/hack/test/decl/classes_require.php.exp | 15 +- hphp/hack/test/decl/classes_typeconst.php.exp | 12 +- hphp/hack/test/decl/const_attribute.php.exp | 11 +- ...traints_mentioning_tparams_in_same_list.php.exp | 5 +- hphp/hack/test/decl/denotable_unions.php.exp | 12 +- hphp/hack/test/decl/deprecated.php.exp | 24 ++-- .../test/decl/deprecated_string_concat.php.exp | 18 ++- .../test/decl/deprecated_string_escaping.php.exp | 6 +- .../test/decl/duplicate_fun_attributes.php.exp | 3 +- hphp/hack/test/decl/dynamically_callable.php.exp | 3 +- hphp/hack/test/decl/empty_method_name.php.exp | 3 +- .../test/decl/explicit_type_collection.php.exp | 5 +- hphp/hack/test/decl/file_mode.php.exp | 3 +- hphp/hack/test/decl/final_method.php.exp | 3 +- .../test/decl/function_where_constraints.php.exp | 6 +- hphp/hack/test/decl/functions.php.exp | 127 +++++++++++------ hphp/hack/test/decl/generic_classes.php.exp | 21 +-- .../test/decl/generic_method_tparam_scope.php.exp | 12 +- hphp/hack/test/decl/hhi.hhi.exp | 12 +- hphp/hack/test/decl/higher_kinded.php.exp | 6 +- hphp/hack/test/decl/ifc_policied.php.exp | 32 +++-- hphp/hack/test/decl/inout.php.exp | 11 +- hphp/hack/test/decl/interface.php.exp | 3 +- hphp/hack/test/decl/interfaces.php.exp | 3 +- hphp/hack/test/decl/like_types.php.exp | 18 ++- hphp/hack/test/decl/memoize_lsb.php.exp | 3 +- .../test/decl/missing_function_typehints.php.exp | 6 +- hphp/hack/test/decl/mutable.php.exp | 42 ++++-- hphp/hack/test/decl/mutable_as_hint1.php.exp | 6 +- ...ace_body_plus_declarations_outside_body.php.exp | 6 +- hphp/hack/test/decl/namespace_elaboration.php.exp | 18 ++- ...bal_body_plus_declarations_outside_body.php.exp | 6 +- hphp/hack/test/decl/namespace_import.php.exp | 3 +- hphp/hack/test/decl/namespace_self.php.exp | 6 +- hphp/hack/test/decl/namespace_unscoped.php.exp | 6 +- hphp/hack/test/decl/only_rx_if_impl_method.php.exp | 3 +- hphp/hack/test/decl/override_attribute.php.exp | 6 +- hphp/hack/test/decl/php_std_lib.hhi.exp | 9 +- hphp/hack/test/decl/property_declarations.php.exp | 3 +- hphp/hack/test/decl/property_needs_init.hhi.exp | 5 +- hphp/hack/test/decl/pure.php.exp | 6 +- .../decl/qualified_name_in_attribute_arg.php.exp | 3 +- hphp/hack/test/decl/readonly.php | 28 ++++ hphp/hack/test/decl/readonly.php.exp | 152 +++++++++++++++++++++ hphp/hack/test/decl/readonly.php.typecheck.exp | 1 + hphp/hack/test/decl/ret_from_kind.php.exp | 9 +- hphp/hack/test/decl/return_disposable.php.exp | 6 +- hphp/hack/test/decl/returns_void_to_rx.php.exp | 3 +- hphp/hack/test/decl/rewritten_tparams.php.exp | 30 ++-- hphp/hack/test/decl/rx.php.exp | 37 +++-- hphp/hack/test/decl/self_in_type_constant.php.exp | 3 +- hphp/hack/test/decl/self_param_mutability.php.exp | 6 +- hphp/hack/test/decl/shapes.php.exp | 18 ++- hphp/hack/test/decl/soft_reified.php.exp | 3 +- hphp/hack/test/decl/soft_type_hint.php.exp | 6 +- .../static_method_call_with_explicit_targ.php.exp | 13 +- .../test/decl/tparams_on_class_and_method.php.exp | 19 ++- hphp/hack/test/decl/traits.php.exp | 9 +- hphp/hack/test/decl/tuples.php.exp | 18 ++- hphp/hack/test/decl/type_param_attrs.php.exp | 3 +- .../test/decl/typeconst_property_promotion.php.exp | 5 +- .../decl/unnamed_variadic_method_parameter.php.exp | 10 +- hphp/hack/test/decl/use_type.php.exp | 6 +- hphp/hack/test/decl/variadic_parameter.php.exp | 11 +- hphp/hack/test/decl/wildcard_invalid.php.exp | 17 ++- hphp/hack/test/decl/wildcard_invalid_targ.php.exp | 6 +- hphp/hack/test/decl/xhp.php.exp | 6 +- hphp/hack/test/decl/xhp_self.php.exp | 3 +- hphp/hack/test/decl/yield_deeper.php.exp | 15 +- 103 files changed, 976 insertions(+), 370 deletions(-) create mode 100644 hphp/hack/test/decl/readonly.php create mode 100644 hphp/hack/test/decl/readonly.php.exp create mode 100644 hphp/hack/test/decl/readonly.php.typecheck.exp diff --git a/hphp/hack/src/decl/decl_folded_class.ml b/hphp/hack/src/decl/decl_folded_class.ml index 78197d22f03..6868faf4363 100644 --- a/hphp/hack/src/decl/decl_folded_class.ml +++ b/hphp/hack/src/decl/decl_folded_class.ml @@ -615,7 +615,8 @@ and build_constructor ~lsb:false ~synthesized:false ~override:false - ~dynamicallycallable:false; + ~dynamicallycallable:false + ~readonly_prop:false; elt_visibility = vis; elt_origin = class_name; elt_reactivity = None; @@ -692,7 +693,8 @@ and prop_decl ~const:(sp_const sp) ~lateinit:(sp_lateinit sp) ~abstract:(sp_abstract sp) - ~dynamicallycallable:false; + ~dynamicallycallable:false + ~readonly_prop:(sp_readonly sp); elt_visibility = vis; elt_origin = snd c.sc_name; elt_reactivity = None; @@ -728,7 +730,8 @@ and static_prop_decl ~override:false ~abstract:(sp_abstract sp) ~synthesized:false - ~dynamicallycallable:false; + ~dynamicallycallable:false + ~readonly_prop:(sp_readonly sp); elt_visibility = vis; elt_origin = snd c.sc_name; elt_reactivity = None; @@ -867,7 +870,8 @@ and method_decl_acc ~lsb:false ~const:false ~lateinit:false - ~dynamicallycallable:(sm_dynamicallycallable m); + ~dynamicallycallable:(sm_dynamicallycallable m) + ~readonly_prop:false; elt_visibility = vis; elt_origin = snd c.sc_name; elt_reactivity = m.sm_reactivity; diff --git a/hphp/hack/src/decl/decl_fun_utils.ml b/hphp/hack/src/decl/decl_fun_utils.ml index f80ca3dd0fc..18cf36d0f08 100644 --- a/hphp/hack/src/decl/decl_fun_utils.ml +++ b/hphp/hack/src/decl/decl_fun_utils.ml @@ -254,7 +254,8 @@ let make_param_ty env ~is_lambda param = ~has_default:(Option.is_some param.param_expr) ~ifc_external:(has_external_attribute param.param_user_attributes) ~ifc_can_call:(has_can_call_attribute param.param_user_attributes) - ~is_atom:(has_atom_attribute param.param_user_attributes); + ~is_atom:(has_atom_attribute param.param_user_attributes) + ~readonly:(Option.is_some param.param_readonly); fp_rx_annotation = rx_annotation; } @@ -274,7 +275,8 @@ let make_ellipsis_param_ty pos = ~has_default:false ~ifc_external:false ~ifc_can_call:false - ~is_atom:false; + ~is_atom:false + ~readonly:false; fp_rx_annotation = None; } diff --git a/hphp/hack/src/decl/decl_hint.ml b/hphp/hack/src/decl/decl_hint.ml index e9f23013765..009f14a33b3 100644 --- a/hphp/hack/src/decl/decl_hint.ml +++ b/hphp/hack/src/decl/decl_hint.ml @@ -120,7 +120,10 @@ and hint_ p env = function (* Currently do not support external and cancall on parameters of function parameters *) ~ifc_external:false ~ifc_can_call:false - ~is_atom:false; + ~is_atom: + false + (* TODO: support readonly on parameters of function parameters *) + ~readonly:false; fp_rx_annotation = None; } in @@ -157,7 +160,10 @@ and hint_ p env = function None ~return_disposable:false ~returns_void_to_rx:false - ~returns_mutable:mut_ret; + ~returns_mutable:mut_ret + ~returns_readonly: + false (* TODO: support readonly on function type hints *) + ~readonly_this:false; ft_reactive = reactivity; (* TODO: handle function parameters with <> *) ft_ifc_decl = default_ifc_fun_decl; diff --git a/hphp/hack/src/decl/decl_nast.ml b/hphp/hack/src/decl/decl_nast.ml index b010e885ff1..10a0db5df6b 100644 --- a/hphp/hack/src/decl/decl_nast.ml +++ b/hphp/hack/src/decl/decl_nast.ml @@ -99,7 +99,10 @@ and fun_decl_in_env (env : Decl_env.env) ~(is_lambda : bool) (f : Nast.fun_) : None ~returns_mutable ~return_disposable - ~returns_void_to_rx; + ~returns_void_to_rx + ~returns_readonly:(Option.is_some f.f_readonly_ret) + ~readonly_this:false; + (* TODO: handle const attribute *) ft_ifc_decl = ifc_decl; } ) in diff --git a/hphp/hack/src/decl/decl_to_typing.ml b/hphp/hack/src/decl/decl_to_typing.ml index e63275b00b9..0d76a188d4d 100644 --- a/hphp/hack/src/decl/decl_to_typing.ml +++ b/hphp/hack/src/decl/decl_to_typing.ml @@ -72,7 +72,9 @@ let shallow_method_to_class_elt child_class mro subst meth : class_elt = ~lateinit:false ~lsb:false ~override:(sm_override meth) - ~dynamicallycallable:(sm_dynamicallycallable meth); + ~dynamicallycallable:(sm_dynamicallycallable meth) + ~readonly_prop:false + (* The readonliness of the method is on the type *); } let shallow_method_to_telt child_class mro subst meth : tagged_elt = @@ -122,7 +124,8 @@ let shallow_prop_to_telt child_class mro subst prop : tagged_elt = ~final:true ~override:false ~synthesized:false - ~dynamicallycallable:false; + ~dynamicallycallable:false + ~readonly_prop:(sp_readonly prop); }; } diff --git a/hphp/hack/src/decl/direct_decl_smart_constructors.rs b/hphp/hack/src/decl/direct_decl_smart_constructors.rs index b85d7e806a9..fef08738001 100644 --- a/hphp/hack/src/decl/direct_decl_smart_constructors.rs +++ b/hphp/hack/src/decl/direct_decl_smart_constructors.rs @@ -535,6 +535,7 @@ pub struct FunParamDecl<'a> { attributes: Node<'a>, visibility: Node<'a>, kind: ParamMode, + readonly: bool, hint: Node<'a>, pos: &'a Pos<'a>, name: Option<&'a str>, @@ -550,6 +551,7 @@ pub struct FunctionHeader<'a> { param_list: Node<'a>, capability: Node<'a>, ret_hint: Node<'a>, + readonly_return: Node<'a>, where_constraints: Node<'a>, } @@ -1483,6 +1485,11 @@ impl<'a> DirectDeclSmartConstructors<'a> { .modifiers .iter() .any(|n| n.is_token(TokenKind::Async)); + let readonly = header + .modifiers + .iter() + .any(|n| n.is_token(TokenKind::Readonly)); + let fun_kind = if body.iter().any(|node| node.is_token(TokenKind::Yield)) { if async_ { FunKind::FAsyncGenerator @@ -1518,6 +1525,13 @@ impl<'a> DirectDeclSmartConstructors<'a> { if attributes.returns_void_to_rx { flags |= FunTypeFlags::RETURNS_VOID_TO_RX; } + if header.readonly_return.is_token(TokenKind::Readonly) { + flags |= FunTypeFlags::RETURNS_READONLY; + } + if readonly { + flags |= FunTypeFlags::READONLY_THIS + } + let ifc_decl = attributes.ifc_attribute; flags |= Self::param_mutability_to_fun_type_flags(attributes.param_mutability); @@ -1567,6 +1581,7 @@ impl<'a> DirectDeclSmartConstructors<'a> { attributes, visibility, kind, + readonly, hint, pos, name, @@ -1653,12 +1668,16 @@ impl<'a> DirectDeclSmartConstructors<'a> { if attributes.atom { flags |= FunParamFlags::ATOM } + if readonly { + flags |= FunParamFlags::READONLY + } match kind { ParamMode::FPinout => { flags |= FunParamFlags::INOUT; } ParamMode::FPnormal => {} }; + if initializer.is_present() { flags |= FunParamFlags::HAS_DEFAULT; } @@ -3108,7 +3127,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> attributes: Self::R, visibility: Self::R, inout: Self::R, - _readonly: Self::R, // TODO: handle readonly in declarations + readonly: Self::R, // TODO: handle readonly in declarations hint: Self::R, name: Self::R, initializer: Self::R, @@ -3135,6 +3154,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> } else { ParamMode::FPnormal }; + let is_readonly = readonly.is_token(TokenKind::Readonly); let hint = if self.opts.interpret_soft_types_as_like_types { let attributes = self.to_attributes(attributes); if attributes.soft { @@ -3152,6 +3172,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> attributes, visibility, kind, + readonly: is_readonly, hint, pos, name, @@ -3166,6 +3187,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> attributes: Node::Ignored(SK::Missing), visibility: Node::Ignored(SK::Missing), kind: ParamMode::FPnormal, + readonly: false, hint, pos: self .get_pos_opt(hint) @@ -3301,7 +3323,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> _right_paren: Self::R, capability: Self::R, _colon: Self::R, - _readonly_return: Self::R, // TODO, declare readonly return + readonly_return: Self::R, ret_hint: Self::R, where_constraints: Self::R, ) -> Self::R { @@ -3314,6 +3336,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> param_list, capability, ret_hint, + readonly_return, where_constraints, })) } @@ -3826,6 +3849,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> flags.set(PropFlags::LSB, attributes.lsb); flags.set(PropFlags::NEEDS_INIT, needs_init); flags.set(PropFlags::ABSTRACT, modifiers.is_abstract); + flags.set(PropFlags::READONLY, modifiers.is_readonly); flags.set(PropFlags::PHP_STD_LIB, attributes.php_std_lib); Some(ShallowProp { xhp_attr: None, @@ -4726,6 +4750,7 @@ impl<'a> FlattenSmartConstructors<'a, DirectDeclSmartConstructors<'a>> visibility: Node::Ignored(SK::Missing), kind, hint, + readonly: false, pos: self.get_pos(hint), name: Some(""), variadic: false, diff --git a/hphp/hack/src/decl/shallow_decl.ml b/hphp/hack/src/decl/shallow_decl.ml index f3cfeba3825..87036b07ac9 100644 --- a/hphp/hack/src/decl/shallow_decl.ml +++ b/hphp/hack/src/decl/shallow_decl.ml @@ -123,7 +123,8 @@ let prop env cv = ~lsb:false ~needs_init:(Option.is_none cv.cv_expr) ~abstract:cv.cv_abstract - ~php_std_lib; + ~php_std_lib + ~readonly:cv.cv_readonly; } and static_prop env cv = @@ -154,7 +155,8 @@ and static_prop env cv = ~lsb ~needs_init:(Option.is_none cv.cv_expr) ~abstract:cv.cv_abstract - ~php_std_lib; + ~php_std_lib + ~readonly:cv.cv_readonly; } let method_type env m = @@ -207,7 +209,9 @@ let method_type env m = mut ~returns_mutable ~return_disposable - ~returns_void_to_rx; + ~returns_void_to_rx + ~returns_readonly:(Option.is_some m.m_readonly_ret) + ~readonly_this:m.m_readonly_this; ft_ifc_decl = ifc_decl; } diff --git a/hphp/hack/src/decl/shallow_decl_defs.ml b/hphp/hack/src/decl/shallow_decl_defs.ml index be95edbf0ea..b3cce84b296 100644 --- a/hphp/hack/src/decl/shallow_decl_defs.ml +++ b/hphp/hack/src/decl/shallow_decl_defs.ml @@ -31,6 +31,7 @@ module PropFlags = struct let lsb_bit = 1 lsl 3 let needs_init_bit = 1 lsl 4 let php_std_lib_bit = 1 lsl 5 + let readonly_bit = 1 lsl 6 let get_abstract = is_set abstract_bit let get_const = is_set const_bit @@ -38,6 +39,7 @@ module PropFlags = struct let get_lsb = is_set lsb_bit let get_needs_init = is_set needs_init_bit let get_php_std_lib = is_set php_std_lib_bit + let get_readonly = is_set readonly_bit let set_abstract = set_bit abstract_bit let set_const = set_bit const_bit @@ -45,6 +47,7 @@ module PropFlags = struct let set_lsb = set_bit lsb_bit let set_needs_init = set_bit needs_init_bit let set_php_std_lib = set_bit php_std_lib_bit + let set_readonly = set_bit readonly_bit let make ~abstract @@ -53,6 +56,7 @@ module PropFlags = struct ~lsb ~needs_init ~php_std_lib + ~readonly = empty |> set_abstract abstract @@ -61,6 +65,7 @@ module PropFlags = struct |> set_lsb lsb |> set_needs_init needs_init |> set_php_std_lib php_std_lib + |> set_readonly readonly let pp fmt t = if t = empty then @@ -222,6 +227,8 @@ let sp_needs_init sp = PropFlags.get_needs_init sp.sp_flags let sp_php_std_lib sp = PropFlags.get_php_std_lib sp.sp_flags +let sp_readonly sp = PropFlags.get_readonly sp.sp_flags + let sm_abstract sm = MethodFlags.get_abstract sm.sm_flags let sm_final sm = MethodFlags.get_final sm.sm_flags diff --git a/hphp/hack/src/decl/shallow_decl_defs.mli b/hphp/hack/src/decl/shallow_decl_defs.mli index 4599f61e80e..1608344adca 100644 --- a/hphp/hack/src/decl/shallow_decl_defs.mli +++ b/hphp/hack/src/decl/shallow_decl_defs.mli @@ -20,6 +20,7 @@ module PropFlags : sig val get_lsb : t -> bool val get_needs_init : t -> bool val get_php_std_lib : t -> bool + val get_readonly : t -> bool val set_abstract : bool -> t -> t val set_const : bool -> t -> t @@ -27,6 +28,7 @@ module PropFlags : sig val set_lsb : bool -> t -> t val set_needs_init : bool -> t -> t val set_php_std_lib : bool -> t -> t + val set_readonly : bool -> t -> t val make : abstract:bool -> @@ -35,6 +37,7 @@ module PropFlags : sig lsb:bool -> needs_init:bool -> php_std_lib:bool -> + readonly: bool -> t end [@@ocamlformat "disable"] @@ -142,6 +145,8 @@ val sp_needs_init : shallow_prop -> bool val sp_php_std_lib : shallow_prop -> bool +val sp_readonly : shallow_prop -> bool + val sm_abstract : shallow_method -> bool val sm_final : shallow_method -> bool diff --git a/hphp/hack/src/oxidized_by_ref/manual/prop_flags.rs b/hphp/hack/src/oxidized_by_ref/manual/prop_flags.rs index 9473a84fd12..7b60dc62a96 100644 --- a/hphp/hack/src/oxidized_by_ref/manual/prop_flags.rs +++ b/hphp/hack/src/oxidized_by_ref/manual/prop_flags.rs @@ -17,6 +17,7 @@ bitflags! { const LSB = 1 << 3; const NEEDS_INIT = 1 << 4; const PHP_STD_LIB = 1 << 5; + const READONLY = 1 << 6; } } diff --git a/hphp/hack/src/oxidized_by_ref/manual/typing_defs_flags.rs b/hphp/hack/src/oxidized_by_ref/manual/typing_defs_flags.rs index 9bb01a3e960..84898f95de1 100644 --- a/hphp/hack/src/oxidized_by_ref/manual/typing_defs_flags.rs +++ b/hphp/hack/src/oxidized_by_ref/manual/typing_defs_flags.rs @@ -26,11 +26,13 @@ bitflags! { const INSTANTIATED_TARGS = 1 << 8; const IS_FUNCTION_POINTER = 1 << 9; + const RETURNS_READONLY = 1 << 10; + const READONLY_THIS = 1 << 11; } } bitflags! { - pub struct FunParamFlags: u8 { + pub struct FunParamFlags: u16 { const ACCEPT_DISPOSABLE = 1 << 0; const INOUT = 1 << 1; const HAS_DEFAULT = 1 << 2; @@ -43,6 +45,8 @@ bitflags! { const MUTABLE_FLAGS_BORROWED = 1 << 7; const MUTABLE_FLAGS_MAYBE = Self::MUTABLE_FLAGS_OWNED.bits | Self::MUTABLE_FLAGS_BORROWED.bits; const MUTABLE_FLAGS_MASK = Self::MUTABLE_FLAGS_OWNED.bits | Self::MUTABLE_FLAGS_BORROWED.bits; + + const READONLY = 1 << 8; } } @@ -129,7 +133,7 @@ impl no_pos_hash::NoPosHash for FunParamFlags { impl serde::Serialize for FunParamFlags { fn serialize(&self, serializer: S) -> Result { - serializer.serialize_u8(self.bits()) + serializer.serialize_u16(self.bits()) } } @@ -140,9 +144,9 @@ impl<'de> serde::Deserialize<'de> for FunParamFlags { type Value = FunParamFlags; fn expecting(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(formatter, "a u8 for FunParamFlags") + write!(formatter, "a u16 for FunParamFlags") } - fn visit_u8(self, value: u8) -> Result { + fn visit_u16(self, value: u16) -> Result { Ok(Self::Value::from_bits_truncate(value)) } } diff --git a/hphp/hack/src/typing/tast_check/type_serialization_identity_check.ml b/hphp/hack/src/typing/tast_check/type_serialization_identity_check.ml index 4388e9c6c69..b158d04c3fd 100644 --- a/hphp/hack/src/typing/tast_check/type_serialization_identity_check.ml +++ b/hphp/hack/src/typing/tast_check/type_serialization_identity_check.ml @@ -56,7 +56,8 @@ let rec strip_ty ty = ~has_default:false ~ifc_external:false ~ifc_can_call:false - ~is_atom:false; + ~is_atom:false + ~readonly:false; (* Dummy values: these aren't currently serialized. *) fp_pos = Pos.none; fp_name = None; diff --git a/hphp/hack/src/typing/typing.ml b/hphp/hack/src/typing/typing.ml index 9474c0542b5..3edc255cd40 100644 --- a/hphp/hack/src/typing/typing.ml +++ b/hphp/hack/src/typing/typing.ml @@ -6509,6 +6509,7 @@ and call ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false in { fp_pos = pos; @@ -6553,6 +6554,8 @@ and call ~return_disposable:false (* TODO: deal with disposable return *) ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false + ~readonly_this:false in let ft_ifc_decl = Typing_defs_core.default_ifc_fun_decl in let fun_locl_type = diff --git a/hphp/hack/src/typing/typing_defs.ml b/hphp/hack/src/typing/typing_defs.ml index 26641e7f6ef..efc69f42e92 100644 --- a/hphp/hack/src/typing/typing_defs.ml +++ b/hphp/hack/src/typing/typing_defs.ml @@ -1146,6 +1146,8 @@ let get_ce_const ce = is_set ce_flags_const ce.ce_flags let get_ce_lateinit ce = is_set ce_flags_lateinit ce.ce_flags +let get_ce_readonly_prop ce = is_set ce_flags_readonly_prop ce.ce_flags + let get_ce_dynamicallycallable ce = is_set ce_flags_dynamicallycallable ce.ce_flags @@ -1192,7 +1194,8 @@ let make_ce_flags ~synthesized ~const ~lateinit - ~dynamicallycallable = + ~dynamicallycallable + ~readonly_prop = let flags = 0 in let flags = set_bit ce_flags_abstract abstract flags in let flags = set_bit ce_flags_final final flags in @@ -1203,6 +1206,7 @@ let make_ce_flags let flags = set_bit ce_flags_lateinit lateinit flags in let flags = set_bit ce_flags_dynamicallycallable dynamicallycallable flags in let flags = Int.bit_or flags (xhp_attr_to_ce_flags xhp_attr) in + let flags = set_bit ce_flags_readonly_prop readonly_prop flags in flags (** Tunapplied_alias is a locl phase constructor that always stands for a higher-kinded type. diff --git a/hphp/hack/src/typing/typing_defs_core.ml b/hphp/hack/src/typing/typing_defs_core.ml index 61371759162..1cb018b4ec0 100644 --- a/hphp/hack/src/typing/typing_defs_core.ml +++ b/hphp/hack/src/typing/typing_defs_core.ml @@ -398,6 +398,10 @@ module Flags = struct let get_ft_returns_mutable ft = is_set ft.ft_flags ft_flags_returns_mutable + let get_ft_returns_readonly ft = is_set ft.ft_flags ft_flags_returns_readonly + + let get_ft_readonly_this ft = is_set ft.ft_flags ft_flags_readonly_this + let get_ft_is_coroutine ft = is_set ft.ft_flags ft_flags_is_coroutine let get_ft_async ft = is_set ft.ft_flags ft_flags_async @@ -466,6 +470,8 @@ module Flags = struct let get_fp_is_atom fp = is_set fp.fp_flags fp_flags_atom + let get_fp_readonly fp = is_set fp.fp_flags fp_flags_readonly + let fun_kind_to_flags kind = match kind with | Ast_defs.FSync -> 0 @@ -474,14 +480,21 @@ module Flags = struct | Ast_defs.FAsyncGenerator -> Int.bit_or ft_flags_async ft_flags_generator let make_ft_flags - kind param_mutable ~return_disposable ~returns_mutable ~returns_void_to_rx - = + kind + param_mutable + ~return_disposable + ~returns_mutable + ~returns_void_to_rx + ~returns_readonly + ~readonly_this = let flags = Int.bit_or (to_mutable_flags param_mutable) (fun_kind_to_flags kind) in let flags = set_bit ft_flags_return_disposable return_disposable flags in let flags = set_bit ft_flags_returns_mutable returns_mutable flags in let flags = set_bit ft_flags_returns_void_to_rx returns_void_to_rx flags in + let flags = set_bit ft_flags_returns_readonly returns_readonly flags in + let flags = set_bit ft_flags_readonly_this readonly_this flags in flags let mode_to_flags mode = @@ -496,7 +509,8 @@ module Flags = struct ~has_default ~ifc_external ~ifc_can_call - ~is_atom = + ~is_atom + ~readonly = let flags = mode_to_flags mode in let flags = Int.bit_or (to_mutable_flags mutability) flags in let flags = set_bit fp_flags_accept_disposable accept_disposable flags in @@ -504,6 +518,7 @@ module Flags = struct let flags = set_bit fp_flags_ifc_external ifc_external flags in let flags = set_bit fp_flags_ifc_can_call ifc_can_call flags in let flags = set_bit fp_flags_atom is_atom flags in + let flags = set_bit fp_flags_readonly readonly flags in flags let get_fp_accept_disposable fp = @@ -890,6 +905,16 @@ module Pp = struct Format.fprintf fmt "@[~%s:" "returns_void_to_rx"; Format.fprintf fmt "%B" (get_ft_returns_void_to_rx ft); Format.fprintf fmt "@]"; + Format.fprintf fmt "@ "; + + Format.fprintf fmt "@[~%s:" "returns_readonly"; + Format.fprintf fmt "%B" (get_ft_returns_readonly ft); + Format.fprintf fmt "@]"; + Format.fprintf fmt "@ "; + + Format.fprintf fmt "@[~%s:" "readonly_this"; + Format.fprintf fmt "%B" (get_ft_readonly_this ft); + Format.fprintf fmt "@]"; Format.fprintf fmt ")@]" in @@ -965,6 +990,11 @@ module Pp = struct Format.fprintf fmt "@[~%s:" "is_atom"; Format.fprintf fmt "%B" (get_fp_is_atom fp); Format.fprintf fmt "@]"; + Format.fprintf fmt "@ "; + + Format.fprintf fmt "@[~%s:" "readonly"; + Format.fprintf fmt "%B" (get_fp_readonly fp); + Format.fprintf fmt "@]"; Format.fprintf fmt ")@]" in diff --git a/hphp/hack/src/typing/typing_defs_core.mli b/hphp/hack/src/typing/typing_defs_core.mli index 7abeb5bf065..58605bb03d2 100644 --- a/hphp/hack/src/typing/typing_defs_core.mli +++ b/hphp/hack/src/typing/typing_defs_core.mli @@ -383,6 +383,8 @@ module Flags : sig val get_ft_returns_mutable : 'a fun_type -> bool + val get_ft_returns_readonly : 'a fun_type -> bool + val get_ft_is_coroutine : 'a fun_type -> bool val get_ft_async : 'a fun_type -> bool @@ -399,6 +401,8 @@ module Flags : sig val get_ft_fun_kind : 'a fun_type -> Ast_defs.fun_kind + val get_ft_readonly_this : 'a fun_type -> bool + val from_mutable_flags : Hh_prelude.Int.t -> param_mutability option val to_mutable_flags : param_mutability option -> Hh_prelude.Int.t @@ -413,6 +417,8 @@ module Flags : sig val get_fp_is_atom : 'a fun_param -> bool + val get_fp_readonly : 'a fun_param -> bool + val fun_kind_to_flags : Ast_defs.fun_kind -> Hh_prelude.Int.t val make_ft_flags : @@ -421,6 +427,8 @@ module Flags : sig return_disposable:bool -> returns_mutable:bool -> returns_void_to_rx:bool -> + returns_readonly:bool -> + readonly_this:bool -> Hh_prelude.Int.t val mode_to_flags : param_mode -> int @@ -433,6 +441,7 @@ module Flags : sig ifc_external:bool -> ifc_can_call:bool -> is_atom:bool -> + readonly:bool -> Hh_prelude.Int.t val get_fp_accept_disposable : 'a fun_param -> bool diff --git a/hphp/hack/src/typing/typing_defs_flags.ml b/hphp/hack/src/typing/typing_defs_flags.ml index 37955e1e68f..64937f3445a 100644 --- a/hphp/hack/src/typing/typing_defs_flags.ml +++ b/hphp/hack/src/typing/typing_defs_flags.ml @@ -53,6 +53,10 @@ let ft_flags_instantiated_targs = 1 lsl 8 let ft_flags_is_function_pointer = 1 lsl 9 +let ft_flags_returns_readonly = 1 lsl 10 + +let ft_flags_readonly_this = 1 lsl 11 + (* Class element flags *) let ce_flags_abstract = 1 lsl 0 @@ -88,6 +92,8 @@ let ce_flags_xa_tag_none = Int.bit_or ce_flags_xa_tag_required ce_flags_ let ce_flags_xa_tag_mask = Int.bit_or ce_flags_xa_tag_required ce_flags_xa_tag_lateinit +let ce_flags_readonly_prop = 1 lsl 13 + (* fun_param flags *) let fp_flags_accept_disposable = 1 lsl 0 @@ -100,3 +106,6 @@ let fp_flags_ifc_external = 1 lsl 3 let fp_flags_ifc_can_call = 1 lsl 4 let fp_flags_atom = 1 lsl 5 + +(* 6 and 7 are taken by mutability parameters above *) +let fp_flags_readonly = 1 lsl 8 diff --git a/hphp/hack/src/typing/typing_extends.ml b/hphp/hack/src/typing/typing_extends.ml index 90b035e5c93..4b6d0fea5f9 100644 --- a/hphp/hack/src/typing/typing_extends.ml +++ b/hphp/hack/src/typing/typing_extends.ml @@ -583,7 +583,8 @@ let default_constructor_ce class_ = ~override:false ~lsb:false ~synthesized:true - ~dynamicallycallable:false; + ~dynamicallycallable:false + ~readonly_prop:false; } (* When an interface defines a constructor, we check that they are compatible *) diff --git a/hphp/hack/src/typing/typing_print.ml b/hphp/hack/src/typing/typing_print.ml index 8c2ba39367c..2fa5405095b 100644 --- a/hphp/hack/src/typing/typing_print.ml +++ b/hphp/hack/src/typing/typing_print.ml @@ -1369,7 +1369,8 @@ module Json = struct ~has_default:false ~ifc_external:false ~ifc_can_call:false - ~is_atom:false; + ~is_atom:false + ~readonly:false; (* Dummy values: these aren't currently serialized. *) fp_pos = Pos.none; fp_name = None; diff --git a/hphp/hack/src/typing/typing_utils.ml b/hphp/hack/src/typing/typing_utils.ml index 66ec8727974..edef9a46b0c 100644 --- a/hphp/hack/src/typing/typing_utils.ml +++ b/hphp/hack/src/typing/typing_utils.ml @@ -596,7 +596,8 @@ let default_fun_param ?(pos = Pos.none) ty : 'a fun_param = ~has_default:false ~ifc_external:false ~ifc_can_call:false - ~is_atom:false; + ~is_atom:false + ~readonly:false; fp_rx_annotation = None; } diff --git a/hphp/hack/test/decl/abstract_method.php.exp b/hphp/hack/test/decl/abstract_method.php.exp index d1eec010e44..5d79a3409f2 100644 --- a/hphp/hack/test/decl/abstract_method.php.exp +++ b/hphp/hack/test/decl/abstract_method.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract } diff --git a/hphp/hack/test/decl/accept_disposable.php.exp b/hphp/hack/test/decl/accept_disposable.php.exp index d9f7172def5..fb09dde242f 100644 --- a/hphp/hack/test/decl/accept_disposable.php.exp +++ b/hphp/hack/test/decl/accept_disposable.php.exp @@ -28,7 +28,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -49,7 +50,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -75,7 +77,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:true ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [9:10-11]) }; @@ -87,7 +90,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/array_typehints.php.exp b/hphp/hack/test/decl/array_typehints.php.exp index f1505ec550b..5f478f5a456 100644 --- a/hphp/hack/test/decl/array_typehints.php.exp +++ b/hphp/hack/test/decl/array_typehints.php.exp @@ -20,7 +20,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-12]; fe_php_std_lib = false })); ("\\v0", @@ -42,7 +43,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-12]; fe_php_std_lib = false })); ("\\v1", @@ -64,7 +66,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [11:10-12]; fe_php_std_lib = false })); ("\\d0", @@ -89,7 +92,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [15:10-12]; fe_php_std_lib = false })); ("\\d2", @@ -114,7 +118,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [19:10-12]; fe_php_std_lib = false })); ("\\vd0", @@ -138,7 +143,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [23:10-13]; fe_php_std_lib = false })); ("\\vd1", @@ -162,7 +168,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [27:10-13]; fe_php_std_lib = false })); ("\\vd2", @@ -186,7 +193,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [31:10-13]; fe_php_std_lib = false })); ("\\vd3", @@ -206,7 +214,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [35:10-13]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/async_and_generator_functions.php.exp b/hphp/hack/test/decl/async_and_generator_functions.php.exp index ed1516d187a..841be100854 100644 --- a/hphp/hack/test/decl/async_and_generator_functions.php.exp +++ b/hphp/hack/test/decl/async_and_generator_functions.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-23]; fe_php_std_lib = false })); ("\\async_function", @@ -38,7 +39,8 @@ }; ft_flags = (make_ft_flags FAsync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [5:16-30]; fe_php_std_lib = false })); ("\\generator_function", @@ -66,7 +68,8 @@ }; ft_flags = (make_ft_flags FGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [10:10-28]; fe_php_std_lib = false })); ("\\generator_function_implicit_key", @@ -94,7 +97,8 @@ }; ft_flags = (make_ft_flags FGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [14:10-41]; fe_php_std_lib = false })); ("\\async_generator", @@ -122,7 +126,8 @@ }; ft_flags = (make_ft_flags FAsyncGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [18:16-31]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/at_most_rx_as_func.php.exp b/hphp/hack/test/decl/at_most_rx_as_func.php.exp index dcaf55ddc4e..ebce1cd02c1 100644 --- a/hphp/hack/test/decl/at_most_rx_as_func.php.exp +++ b/hphp/hack/test/decl/at_most_rx_as_func.php.exp @@ -35,7 +35,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -48,7 +48,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = RxVar {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -56,7 +57,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [6:5-7]; fp_name = (Some "$x"); fp_type = @@ -69,7 +71,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [4:10-11]) }; @@ -81,7 +84,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/at_most_rx_as_func_with_optional_func.php.exp b/hphp/hack/test/decl/at_most_rx_as_func_with_optional_func.php.exp index efa80626e59..dc47945e65f 100644 --- a/hphp/hack/test/decl/at_most_rx_as_func_with_optional_func.php.exp +++ b/hphp/hack/test/decl/at_most_rx_as_func_with_optional_func.php.exp @@ -37,7 +37,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -51,7 +51,8 @@ ft_flags = (make_ft_flags FSync None ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = RxVar {}; ft_ifc_decl = FDPolicied {PUBLIC} })))) }; @@ -59,7 +60,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:true ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [4:10-11]) }; @@ -71,7 +73,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/atom.php.exp b/hphp/hack/test/decl/atom.php.exp index 045ca19da5c..1f4d6a0235e 100644 --- a/hphp/hack/test/decl/atom.php.exp +++ b/hphp/hack/test/decl/atom.php.exp @@ -178,7 +178,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:true); + ~ifc_external:false ~ifc_can_call:false ~is_atom:true + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [20:10-12]) }; @@ -190,7 +191,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [20:10-12]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/auto_ns_use.php.exp b/hphp/hack/test/decl/auto_ns_use.php.exp index 711e9a8e58c..8a11b9ff477 100644 --- a/hphp/hack/test/decl/auto_ns_use.php.exp +++ b/hphp/hack/test/decl/auto_ns_use.php.exp @@ -27,7 +27,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [8:12-21]; fe_php_std_lib = false })); ("\\get_value", @@ -50,7 +51,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [12:50-52]; fp_name = (Some "$k"); fp_type = @@ -63,7 +65,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [12:12-21]) }; @@ -75,7 +78,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [12:12-21]; fe_php_std_lib = false })); ("\\MyDict", diff --git a/hphp/hack/test/decl/cipp.php.exp b/hphp/hack/test/decl/cipp.php.exp index 64b3ce0a734..a3591c71a4c 100644 --- a/hphp/hack/test/decl/cipp.php.exp +++ b/hphp/hack/test/decl/cipp.php.exp @@ -25,7 +25,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Cipp {\C}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; { Shallow_decl_defs.sm_name = ([8:19-37], "cipp_global_method"); @@ -45,7 +46,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = CippGlobal; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -66,7 +68,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = CippLocal {a}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -87,7 +90,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = CippRx; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } ]; @@ -109,7 +113,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Cipp {b}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [18:10-23]; fe_php_std_lib = false })); ("\\cipp_global_function", @@ -129,7 +134,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = CippGlobal; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [21:10-30]; fe_php_std_lib = false })); ("\\cipp_local_function", @@ -149,7 +155,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = CippLocal {\C}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [24:10-29]; fe_php_std_lib = false })); @@ -170,7 +177,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = CippRx; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [27:10-26]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/class_in_namespace.php.exp b/hphp/hack/test/decl/class_in_namespace.php.exp index 22d592a7dfb..6061b40f22c 100644 --- a/hphp/hack/test/decl/class_in_namespace.php.exp +++ b/hphp/hack/test/decl/class_in_namespace.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/classes.php.exp b/hphp/hack/test/decl/classes.php.exp index 6dc783c4fd3..61cb5fa3d52 100644 --- a/hphp/hack/test/decl/classes.php.exp +++ b/hphp/hack/test/decl/classes.php.exp @@ -52,7 +52,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; @@ -76,7 +77,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Private; sm_deprecated = None; sm_flags = (empty) }; @@ -97,7 +99,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -118,7 +121,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Protected; sm_deprecated = None; @@ -142,7 +146,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [16:9-14]; fp_name = (Some "$arg2"); fp_type = @@ -155,8 +160,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -177,7 +182,8 @@ }; ft_flags = (make_ft_flags FAsyncGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -198,7 +204,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -220,7 +227,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Shallow {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -242,7 +250,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Local {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; { Shallow_decl_defs.sm_name = @@ -267,7 +276,7 @@ ~mutability:(Some Typing_defs_core.Param_borrowed_mutable) ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); }; { fp_pos = [34:32-34]; fp_name = (Some "$b"); fp_type = @@ -282,7 +291,7 @@ ~mutability:(Some Typing_defs_core.Param_maybe_mutable) ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); }; { fp_pos = [35:32-34]; fp_name = (Some "$c"); fp_type = @@ -297,7 +306,7 @@ ~mutability:(Some Typing_defs_core.Param_owned_mutable) ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -310,7 +319,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -331,7 +341,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:true ~returns_void_to_rx:false); + ~returns_mutable:true ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -428,7 +439,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); }; { fp_pos = [52:22-32]; fp_name = (Some "$protected"); fp_type = @@ -443,7 +454,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); }; { fp_pos = [53:19-26]; fp_name = (Some "$public"); fp_type = @@ -458,7 +469,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); }; { fp_pos = [54:19-30]; fp_name = (Some "$hasDefault"); @@ -474,7 +485,7 @@ ~accept_disposable:false ~has_default:true ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -487,7 +498,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/classes_consistent_construct.php.exp b/hphp/hack/test/decl/classes_consistent_construct.php.exp index 142d3a33222..37142f2d6e9 100644 --- a/hphp/hack/test/decl/classes_consistent_construct.php.exp +++ b/hphp/hack/test/decl/classes_consistent_construct.php.exp @@ -48,7 +48,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -61,7 +61,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/classes_inferred_constant_types.php.exp b/hphp/hack/test/decl/classes_inferred_constant_types.php.exp index 6dbcfd8800b..1ded41c7223 100644 --- a/hphp/hack/test/decl/classes_inferred_constant_types.php.exp +++ b/hphp/hack/test/decl/classes_inferred_constant_types.php.exp @@ -50,7 +50,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/classes_inheritance.php.exp b/hphp/hack/test/decl/classes_inheritance.php.exp index 4e55df951a4..bdec59bb5bd 100644 --- a/hphp/hack/test/decl/classes_inheritance.php.exp +++ b/hphp/hack/test/decl/classes_inheritance.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -45,7 +46,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -83,7 +85,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -104,7 +107,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) @@ -139,7 +143,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract @@ -178,7 +183,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract @@ -216,7 +222,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -257,7 +264,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/classes_require.php.exp b/hphp/hack/test/decl/classes_require.php.exp index 1439905cde2..8f03a00a9bd 100644 --- a/hphp/hack/test/decl/classes_require.php.exp +++ b/hphp/hack/test/decl/classes_require.php.exp @@ -25,7 +25,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -46,7 +47,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -80,7 +82,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract @@ -121,7 +124,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -164,7 +168,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/classes_typeconst.php.exp b/hphp/hack/test/decl/classes_typeconst.php.exp index 7211e684759..4afefc214f0 100644 --- a/hphp/hack/test/decl/classes_typeconst.php.exp +++ b/hphp/hack/test/decl/classes_typeconst.php.exp @@ -41,7 +41,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -65,7 +66,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -115,7 +117,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -131,7 +134,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract diff --git a/hphp/hack/test/decl/const_attribute.php.exp b/hphp/hack/test/decl/const_attribute.php.exp index 3f9a19ffc08..2759d97ba23 100644 --- a/hphp/hack/test/decl/const_attribute.php.exp +++ b/hphp/hack/test/decl/const_attribute.php.exp @@ -38,7 +38,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; @@ -84,7 +85,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; @@ -130,7 +132,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -143,7 +145,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/constraints_mentioning_tparams_in_same_list.php.exp b/hphp/hack/test/decl/constraints_mentioning_tparams_in_same_list.php.exp index 0838f90d633..5787d0b588b 100644 --- a/hphp/hack/test/decl/constraints_mentioning_tparams_in_same_list.php.exp +++ b/hphp/hack/test/decl/constraints_mentioning_tparams_in_same_list.php.exp @@ -115,7 +115,7 @@ (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -128,7 +128,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} }))) ]; diff --git a/hphp/hack/test/decl/denotable_unions.php.exp b/hphp/hack/test/decl/denotable_unions.php.exp index fd10e7721da..3fb1665f77d 100644 --- a/hphp/hack/test/decl/denotable_unions.php.exp +++ b/hphp/hack/test/decl/denotable_unions.php.exp @@ -45,7 +45,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [9:10-11]) }; @@ -57,7 +58,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-11]; fe_php_std_lib = false })); ("\\g", @@ -85,7 +87,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [10:10-11]) }; @@ -97,7 +100,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [10:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/deprecated.php.exp b/hphp/hack/test/decl/deprecated.php.exp index bbfa567ae56..184fbcd5bb6 100644 --- a/hphp/hack/test/decl/deprecated.php.exp +++ b/hphp/hack/test/decl/deprecated.php.exp @@ -25,7 +25,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; @@ -49,7 +50,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -70,7 +72,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -91,7 +94,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; @@ -118,7 +122,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [18:10-13]; fe_php_std_lib = false })); ("\\bar", @@ -138,7 +143,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [21:10-13]; fe_php_std_lib = false })); ("\\baz", @@ -158,7 +164,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [24:10-13]; fe_php_std_lib = false })); ("\\foo2", @@ -179,7 +186,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [27:10-14]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/deprecated_string_concat.php.exp b/hphp/hack/test/decl/deprecated_string_concat.php.exp index 996426f2103..e4a3a47c37d 100644 --- a/hphp/hack/test/decl/deprecated_string_concat.php.exp +++ b/hphp/hack/test/decl/deprecated_string_concat.php.exp @@ -16,7 +16,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-22]; fe_php_std_lib = false })); ("\\doubledouble", @@ -37,7 +38,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-22]; fe_php_std_lib = false })); ("\\singledouble", @@ -58,7 +60,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [10:10-22]; fe_php_std_lib = false })); ("\\singledoublesingle", @@ -79,7 +82,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [13:10-28]; fe_php_std_lib = false })); ("\\heredoc", @@ -100,7 +104,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [19:10-17]; fe_php_std_lib = false })); ("\\nowdoc", @@ -121,7 +126,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [25:10-16]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/deprecated_string_escaping.php.exp b/hphp/hack/test/decl/deprecated_string_escaping.php.exp index 17597154991..5fa0169edcb 100644 --- a/hphp/hack/test/decl/deprecated_string_escaping.php.exp +++ b/hphp/hack/test/decl/deprecated_string_escaping.php.exp @@ -16,7 +16,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-16]; fe_php_std_lib = false })); ("\\double", @@ -37,7 +38,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-16]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/duplicate_fun_attributes.php.exp b/hphp/hack/test/decl/duplicate_fun_attributes.php.exp index 11e8423d992..ef7280bb67f 100644 --- a/hphp/hack/test/decl/duplicate_fun_attributes.php.exp +++ b/hphp/hack/test/decl/duplicate_fun_attributes.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/dynamically_callable.php.exp b/hphp/hack/test/decl/dynamically_callable.php.exp index 17f3749b012..e3a7b230471 100644 --- a/hphp/hack/test/decl/dynamically_callable.php.exp +++ b/hphp/hack/test/decl/dynamically_callable.php.exp @@ -26,7 +26,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/empty_method_name.php.exp b/hphp/hack/test/decl/empty_method_name.php.exp index aa62bd75314..4e5556509af 100644 --- a/hphp/hack/test/decl/empty_method_name.php.exp +++ b/hphp/hack/test/decl/empty_method_name.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/explicit_type_collection.php.exp b/hphp/hack/test/decl/explicit_type_collection.php.exp index 426191b9781..8a3cc6e8c7f 100644 --- a/hphp/hack/test/decl/explicit_type_collection.php.exp +++ b/hphp/hack/test/decl/explicit_type_collection.php.exp @@ -44,7 +44,7 @@ (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -57,7 +57,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/file_mode.php.exp b/hphp/hack/test/decl/file_mode.php.exp index 9d41691b8ce..3b80149784e 100644 --- a/hphp/hack/test/decl/file_mode.php.exp +++ b/hphp/hack/test/decl/file_mode.php.exp @@ -26,7 +26,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [5:10-29]; fe_php_std_lib = false })); ("\\MyPartialType", diff --git a/hphp/hack/test/decl/final_method.php.exp b/hphp/hack/test/decl/final_method.php.exp index b73cb0a7386..e2dda9b9591 100644 --- a/hphp/hack/test/decl/final_method.php.exp +++ b/hphp/hack/test/decl/final_method.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = final } diff --git a/hphp/hack/test/decl/function_where_constraints.php.exp b/hphp/hack/test/decl/function_where_constraints.php.exp index 3fc17dc9ebf..963c349a87b 100644 --- a/hphp/hack/test/decl/function_where_constraints.php.exp +++ b/hphp/hack/test/decl/function_where_constraints.php.exp @@ -78,7 +78,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -147,7 +148,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/functions.php.exp b/hphp/hack/test/decl/functions.php.exp index 294899af6cf..51f2f346b3e 100644 --- a/hphp/hack/test/decl/functions.php.exp +++ b/hphp/hack/test/decl/functions.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-25]; fe_php_std_lib = false })); ("\\simple_int_function", @@ -35,7 +36,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-29]; fe_php_std_lib = false })); ("\\simple_function_with_body", @@ -55,7 +57,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-35]; fe_php_std_lib = false })); ("\\function_with_args", @@ -78,7 +81,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [11:46-51]; fp_name = (Some "$arg2"); fp_type = @@ -91,7 +95,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [11:10-28]) }; @@ -103,7 +108,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [11:10-28]; fe_php_std_lib = false })); ("\\Typedef", @@ -134,7 +140,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [14:10-42]) }; @@ -146,7 +153,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [14:10-42]; fe_php_std_lib = false })); ("\\test_generic_fun", @@ -175,7 +183,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [18:10-26]) }; @@ -187,7 +196,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [18:10-26]; fe_php_std_lib = false })); ("\\test_constrained_generic_fun", @@ -228,7 +238,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [24:6-11]; fp_name = (Some "$arg2"); fp_type = @@ -241,7 +252,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [22:10-38]) }; @@ -253,7 +265,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [22:10-38]; fe_php_std_lib = false })); ("\\test_returns_generic", @@ -276,7 +289,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [29:10-30]; fe_php_std_lib = false })); ("\\takes_optional", @@ -301,7 +315,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [33:10-24]) }; @@ -313,7 +328,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [33:10-24]; fe_php_std_lib = false })); ("\\in_out", @@ -336,7 +352,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPinout - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [35:10-16]) }; @@ -348,7 +365,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [35:10-16]; fe_php_std_lib = false })); ("\\takes_returns_function_type", @@ -377,7 +395,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [39:24-31]; fp_name = (Some "$unused"); fp_type = @@ -401,7 +420,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -414,7 +433,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -422,7 +442,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [37:10-37]) }; @@ -457,7 +478,7 @@ ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -472,7 +493,9 @@ (make_ft_flags FSync None ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false + ~returns_readonly:false + ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -482,7 +505,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -495,13 +518,15 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })) }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [37:10-37]; fe_php_std_lib = false })); ("\\takes_returns_dict", @@ -530,7 +555,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [46:10-28]) }; @@ -548,7 +574,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [46:10-28]; fe_php_std_lib = false })); ("\\reactive_function", @@ -568,7 +595,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [51:10-27]; fe_php_std_lib = false })); ("\\shallow_reactive_function", @@ -588,7 +616,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Shallow {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [54:10-35]; fe_php_std_lib = false })); ("\\local_reactive_function", @@ -608,7 +637,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Local {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [57:10-33]; fe_php_std_lib = false })); ("\\reactive_function_mutable_args", @@ -633,7 +663,7 @@ ~mutability:(Some Typing_defs_core.Param_borrowed_mutable) ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); }; { fp_pos = [62:30-32]; fp_name = (Some "$b"); fp_type = @@ -648,7 +678,7 @@ ~mutability:(Some Typing_defs_core.Param_maybe_mutable) ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); }; { fp_pos = [63:30-32]; fp_name = (Some "$c"); fp_type = @@ -663,7 +693,7 @@ ~mutability:(Some Typing_defs_core.Param_owned_mutable) ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [60:10-40]) }; @@ -675,7 +705,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [60:10-40]; fe_php_std_lib = false })); ("\\C", @@ -706,7 +737,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:true ~returns_void_to_rx:false); + ~returns_mutable:true ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [70:10-14]; fe_php_std_lib = false })); ("\\null_type_hint", @@ -741,7 +773,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [74:10-24]) }; @@ -753,7 +786,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [74:10-24]; fe_php_std_lib = false })); ("\\resource_type_hint", @@ -776,7 +810,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [78:10-28]) }; @@ -788,7 +823,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [78:10-28]; fe_php_std_lib = false })); ("\\noreturn_type_hint", @@ -808,7 +844,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [82:10-28]; fe_php_std_lib = false })); ("\\variadic_function", @@ -830,7 +867,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } )); ft_tparams = []; ft_where_constraints = []; ft_params = []; @@ -843,7 +881,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [87:10-27]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/generic_classes.php.exp b/hphp/hack/test/decl/generic_classes.php.exp index ef5b4182888..65cd55090dc 100644 --- a/hphp/hack/test/decl/generic_classes.php.exp +++ b/hphp/hack/test/decl/generic_classes.php.exp @@ -42,7 +42,7 @@ (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -55,7 +55,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; @@ -79,7 +80,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -130,7 +132,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -143,7 +145,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; @@ -195,7 +198,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -208,7 +211,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; @@ -232,7 +236,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/generic_method_tparam_scope.php.exp b/hphp/hack/test/decl/generic_method_tparam_scope.php.exp index 91523120580..8be0f8ed9b8 100644 --- a/hphp/hack/test/decl/generic_method_tparam_scope.php.exp +++ b/hphp/hack/test/decl/generic_method_tparam_scope.php.exp @@ -33,7 +33,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [4:19-20]) }; @@ -45,7 +46,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -74,7 +76,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -87,7 +90,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/hhi.hhi.exp b/hphp/hack/test/decl/hhi.hhi.exp index c83615ced7a..4a9528db51d 100644 --- a/hphp/hack/test/decl/hhi.hhi.exp +++ b/hphp/hack/test/decl/hhi.hhi.exp @@ -29,7 +29,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [7:10-11]) }; @@ -40,7 +41,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-11]; fe_php_std_lib = false })); ("\\C", @@ -73,7 +75,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -86,7 +89,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/higher_kinded.php.exp b/hphp/hack/test/decl/higher_kinded.php.exp index aa3ece74a0d..5a916ba8425 100644 --- a/hphp/hack/test/decl/higher_kinded.php.exp +++ b/hphp/hack/test/decl/higher_kinded.php.exp @@ -86,7 +86,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [7:10-16]) }; @@ -101,7 +102,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-16]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/ifc_policied.php.exp b/hphp/hack/test/decl/ifc_policied.php.exp index fa26b43e831..bc7e76ffc60 100644 --- a/hphp/hack/test/decl/ifc_policied.php.exp +++ b/hphp/hack/test/decl/ifc_policied.php.exp @@ -37,7 +37,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {Test} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; { Shallow_decl_defs.sm_name = ([10:19-20], "g"); @@ -57,7 +58,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {Public} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) @@ -79,7 +81,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -100,7 +103,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDInferFlows })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -121,7 +125,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {\Policy} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) @@ -143,7 +148,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) @@ -167,7 +173,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:true ~ifc_can_call:false ~is_atom:false); + ~ifc_external:true ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [26:38-40]; fp_name = (Some "$f"); fp_type = @@ -189,7 +196,8 @@ (make_ft_flags FSync None ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -198,7 +206,7 @@ (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:true ~is_atom:false); + ~ifc_can_call:true ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -211,7 +219,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) @@ -235,7 +244,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDInferFlows })); fe_pos = [31:10-20]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/inout.php.exp b/hphp/hack/test/decl/inout.php.exp index c4a81adeb79..f1e8a46705d 100644 --- a/hphp/hack/test/decl/inout.php.exp +++ b/hphp/hack/test/decl/inout.php.exp @@ -29,7 +29,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPinout ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -42,7 +42,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -50,7 +51,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [3:10-11]) }; @@ -62,7 +64,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/interface.php.exp b/hphp/hack/test/decl/interface.php.exp index a9ad48e34fe..b4ca4ada419 100644 --- a/hphp/hack/test/decl/interface.php.exp +++ b/hphp/hack/test/decl/interface.php.exp @@ -25,7 +25,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract } diff --git a/hphp/hack/test/decl/interfaces.php.exp b/hphp/hack/test/decl/interfaces.php.exp index ebc03a2eee4..ea40a1d2445 100644 --- a/hphp/hack/test/decl/interfaces.php.exp +++ b/hphp/hack/test/decl/interfaces.php.exp @@ -25,7 +25,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract } diff --git a/hphp/hack/test/decl/like_types.php.exp b/hphp/hack/test/decl/like_types.php.exp index 80670690c09..bc21575da39 100644 --- a/hphp/hack/test/decl/like_types.php.exp +++ b/hphp/hack/test/decl/like_types.php.exp @@ -18,7 +18,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [4:10-20]) }; @@ -30,7 +31,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-20]; fe_php_std_lib = false })); ("\\f", @@ -65,7 +67,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [6:10-11]) }; @@ -77,7 +80,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [6:10-11]; fe_php_std_lib = false })); ("\\X", @@ -123,7 +127,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -136,7 +141,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/memoize_lsb.php.exp b/hphp/hack/test/decl/memoize_lsb.php.exp index 4bbf9615f46..ed848848b53 100644 --- a/hphp/hack/test/decl/memoize_lsb.php.exp +++ b/hphp/hack/test/decl/memoize_lsb.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/missing_function_typehints.php.exp b/hphp/hack/test/decl/missing_function_typehints.php.exp index fcc58081e71..f72b8354365 100644 --- a/hphp/hack/test/decl/missing_function_typehints.php.exp +++ b/hphp/hack/test/decl/missing_function_typehints.php.exp @@ -18,7 +18,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [3:10-11]) }; @@ -30,7 +31,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/mutable.php.exp b/hphp/hack/test/decl/mutable.php.exp index 47f0b3d8668..55f9e2b28cc 100644 --- a/hphp/hack/test/decl/mutable.php.exp +++ b/hphp/hack/test/decl/mutable.php.exp @@ -41,7 +41,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -54,7 +54,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -62,7 +63,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [6:10-11]) }; @@ -74,7 +76,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [6:10-11]; fe_php_std_lib = false })); ("\\g", @@ -109,7 +112,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -122,7 +125,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -130,7 +134,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [9:10-11]) }; @@ -142,7 +147,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-11]; fe_php_std_lib = false })); ("\\h", @@ -177,7 +183,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -190,7 +196,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -198,7 +205,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [12:10-11]) }; @@ -210,7 +218,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [12:10-11]; fe_php_std_lib = false })); ("\\i", @@ -240,7 +249,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:true ~returns_void_to_rx:false); + ~returns_mutable:true ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -248,7 +258,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [15:10-11]) }; @@ -260,7 +271,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [15:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/mutable_as_hint1.php.exp b/hphp/hack/test/decl/mutable_as_hint1.php.exp index 64186d50b60..fc5431ab3f1 100644 --- a/hphp/hack/test/decl/mutable_as_hint1.php.exp +++ b/hphp/hack/test/decl/mutable_as_hint1.php.exp @@ -29,7 +29,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [7:10-11]) }; @@ -41,7 +42,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/namespace_body_plus_declarations_outside_body.php.exp b/hphp/hack/test/decl/namespace_body_plus_declarations_outside_body.php.exp index 05c1fd75756..408b9ecd9d7 100644 --- a/hphp/hack/test/decl/namespace_body_plus_declarations_outside_body.php.exp +++ b/hphp/hack/test/decl/namespace_body_plus_declarations_outside_body.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:12-13]; fe_php_std_lib = false })); ("\\b", @@ -35,7 +36,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/namespace_elaboration.php.exp b/hphp/hack/test/decl/namespace_elaboration.php.exp index fb66e6fb3cc..2020534a4ff 100644 --- a/hphp/hack/test/decl/namespace_elaboration.php.exp +++ b/hphp/hack/test/decl/namespace_elaboration.php.exp @@ -18,7 +18,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [31:10-12]) }; @@ -30,7 +31,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [31:10-12]; fe_php_std_lib = false })); ("\\other_id", @@ -53,7 +55,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [35:10-18]) }; @@ -65,7 +68,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [35:10-18]; fe_php_std_lib = false })); ("\\braced_id", @@ -89,7 +93,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [39:10-19]) }; @@ -101,7 +106,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [39:10-19]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/namespace_global_body_plus_declarations_outside_body.php.exp b/hphp/hack/test/decl/namespace_global_body_plus_declarations_outside_body.php.exp index d6a57452210..9d84cc9485d 100644 --- a/hphp/hack/test/decl/namespace_global_body_plus_declarations_outside_body.php.exp +++ b/hphp/hack/test/decl/namespace_global_body_plus_declarations_outside_body.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:12-13]; fe_php_std_lib = false })); ("\\b", @@ -35,7 +36,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/namespace_import.php.exp b/hphp/hack/test/decl/namespace_import.php.exp index b54f744e874..a04ec11bea9 100644 --- a/hphp/hack/test/decl/namespace_import.php.exp +++ b/hphp/hack/test/decl/namespace_import.php.exp @@ -34,7 +34,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [15:12-16]; fe_php_std_lib = false })); ("\\D", diff --git a/hphp/hack/test/decl/namespace_self.php.exp b/hphp/hack/test/decl/namespace_self.php.exp index 2fe6169c0e5..387f2ced73d 100644 --- a/hphp/hack/test/decl/namespace_self.php.exp +++ b/hphp/hack/test/decl/namespace_self.php.exp @@ -64,7 +64,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -77,7 +78,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/namespace_unscoped.php.exp b/hphp/hack/test/decl/namespace_unscoped.php.exp index bd28ef6ba62..e19a200597a 100644 --- a/hphp/hack/test/decl/namespace_unscoped.php.exp +++ b/hphp/hack/test/decl/namespace_unscoped.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [5:10-11]; fe_php_std_lib = false })); ("\\NS2\\f", @@ -35,7 +36,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/only_rx_if_impl_method.php.exp b/hphp/hack/test/decl/only_rx_if_impl_method.php.exp index d2fa9cad02a..257a3ed2e32 100644 --- a/hphp/hack/test/decl/only_rx_if_impl_method.php.exp +++ b/hphp/hack/test/decl/only_rx_if_impl_method.php.exp @@ -37,7 +37,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {(Rhint (root|only_rx_if_impl_method.php line 6, characters 26-35), (Tapply (([6:26-29], "\\IRx"), [])))}; diff --git a/hphp/hack/test/decl/override_attribute.php.exp b/hphp/hack/test/decl/override_attribute.php.exp index 079fe2f8dc7..14e2f03cc24 100644 --- a/hphp/hack/test/decl/override_attribute.php.exp +++ b/hphp/hack/test/decl/override_attribute.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -62,7 +63,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = override diff --git a/hphp/hack/test/decl/php_std_lib.hhi.exp b/hphp/hack/test/decl/php_std_lib.hhi.exp index 556c766326e..959e0434d5a 100644 --- a/hphp/hack/test/decl/php_std_lib.hhi.exp +++ b/hphp/hack/test/decl/php_std_lib.hhi.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-11]; fe_php_std_lib = true })); ("\\C", @@ -65,7 +66,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; @@ -89,7 +91,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/property_declarations.php.exp b/hphp/hack/test/decl/property_declarations.php.exp index b01ddc3a318..4cf32b8c2b8 100644 --- a/hphp/hack/test/decl/property_declarations.php.exp +++ b/hphp/hack/test/decl/property_declarations.php.exp @@ -51,7 +51,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/property_needs_init.hhi.exp b/hphp/hack/test/decl/property_needs_init.hhi.exp index fa9d5f5e19d..ee7730ff2be 100644 --- a/hphp/hack/test/decl/property_needs_init.hhi.exp +++ b/hphp/hack/test/decl/property_needs_init.hhi.exp @@ -41,7 +41,7 @@ (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -54,7 +54,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/pure.php.exp b/hphp/hack/test/decl/pure.php.exp index fb9b60dd603..19919ba81ee 100644 --- a/hphp/hack/test/decl/pure.php.exp +++ b/hphp/hack/test/decl/pure.php.exp @@ -14,7 +14,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Pure {}; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-14]; fe_php_std_lib = false })); ("\\C", @@ -45,7 +46,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Pure {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } ]; diff --git a/hphp/hack/test/decl/qualified_name_in_attribute_arg.php.exp b/hphp/hack/test/decl/qualified_name_in_attribute_arg.php.exp index 2f18237b6cd..383111de74e 100644 --- a/hphp/hack/test/decl/qualified_name_in_attribute_arg.php.exp +++ b/hphp/hack/test/decl/qualified_name_in_attribute_arg.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/readonly.php b/hphp/hack/test/decl/readonly.php new file mode 100644 index 00000000000..b1b3ba9f17a --- /dev/null +++ b/hphp/hack/test/decl/readonly.php @@ -0,0 +1,28 @@ +> +class Foo { +} + +async function returns_readonly() : readonly Awaitable { + return new Foo(); +} + +async function returns_normal(): Awaitable { + return new Foo(); +} + +class Bar { + public readonly Foo $x; + + public function __construct( + public readonly Foo $y, + ) { + $this->x = new Foo(); + } + public readonly function getFoo() : void { + $f = /* <> */ (Foo $y) ==> {return $y;}; + $z = readonly function(Foo $f) : void { + }; + } + +} diff --git a/hphp/hack/test/decl/readonly.php.exp b/hphp/hack/test/decl/readonly.php.exp new file mode 100644 index 00000000000..12143277dc9 --- /dev/null +++ b/hphp/hack/test/decl/readonly.php.exp @@ -0,0 +1,152 @@ +[("\\Foo", + (Shallow_decl_defs.Class + { Shallow_decl_defs.sc_mode = Mstrict; sc_final = false; + sc_is_xhp = false; sc_has_xhp_keyword = false; sc_kind = Cnormal; + sc_name = ([3:7-10], "\\Foo"); sc_tparams = []; + sc_where_constraints = []; sc_extends = []; sc_uses = []; + sc_xhp_attr_uses = []; sc_req_extends = []; sc_req_implements = []; + sc_implements = []; sc_implements_dynamic = false; sc_consts = []; + sc_typeconsts = []; sc_props = []; sc_sprops = []; + sc_constructor = None; sc_static_methods = []; sc_methods = []; + sc_user_attributes = []; sc_enum_type = None })); + ("\\returns_readonly", + (Shallow_decl_defs.Fun + { Typing_defs.fe_deprecated = None; + fe_type = + (Rwitness (root|readonly.php line 6, characters 16-31), + (Tfun + { ft_arity = (Fstandard ()); ft_tparams = []; + ft_where_constraints = []; ft_params = []; + ft_implicit_params = { capability = (CapDefaults [6:16-32]) }; + ft_ret = + { et_enforced = false; + et_type = + (Rhint (root|readonly.php line 6, characters 46-59), + (Tapply (([6:46-55], "\\HH\\Awaitable"), + [(Rhint (root|readonly.php line 6, characters 56-58), + (Tapply (([6:56-59], "\\Foo"), [])))] + ))) + }; + ft_flags = + (make_ft_flags FAsync None ~return_disposable:false + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:true ~readonly_this:false); + ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); + fe_pos = [6:16-32]; fe_php_std_lib = false })); + ("\\returns_normal", + (Shallow_decl_defs.Fun + { Typing_defs.fe_deprecated = None; + fe_type = + (Rwitness (root|readonly.php line 10, characters 16-29), + (Tfun + { ft_arity = (Fstandard ()); ft_tparams = []; + ft_where_constraints = []; ft_params = []; + ft_implicit_params = { capability = (CapDefaults [10:16-30]) }; + ft_ret = + { et_enforced = false; + et_type = + (Rhint (root|readonly.php line 10, characters 34-47), + (Tapply (([10:34-43], "\\HH\\Awaitable"), + [(Rhint (root|readonly.php line 10, characters 44-46), + (Tapply (([10:44-47], "\\Foo"), [])))] + ))) + }; + ft_flags = + (make_ft_flags FAsync None ~return_disposable:false + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); + ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); + fe_pos = [10:16-30]; fe_php_std_lib = false })); + ("\\Bar", + (Shallow_decl_defs.Class + { Shallow_decl_defs.sc_mode = Mstrict; sc_final = false; + sc_is_xhp = false; sc_has_xhp_keyword = false; sc_kind = Cnormal; + sc_name = ([14:7-10], "\\Bar"); sc_tparams = []; + sc_where_constraints = []; sc_extends = []; sc_uses = []; + sc_xhp_attr_uses = []; sc_req_extends = []; sc_req_implements = []; + sc_implements = []; sc_implements_dynamic = false; sc_consts = []; + sc_typeconsts = []; + sc_props = + [{ Shallow_decl_defs.sp_name = ([15:23-25], "x"); sp_xhp_attr = None; + sp_type = + (Some (Rhint (root|readonly.php line 15, characters 19-21), + (Tapply (([15:19-22], "\\Foo"), [])))); + sp_visibility = Public; sp_flags = needs_init }; + { Shallow_decl_defs.sp_name = ([18:25-27], "y"); + sp_xhp_attr = None; + sp_type = + (Some (Rhint (root|readonly.php line 18, characters 21-23), + (Tapply (([18:21-24], "\\Foo"), [])))); + sp_visibility = Public; sp_flags = needs_init } + ]; + sc_sprops = []; + sc_constructor = + (Some { Shallow_decl_defs.sm_name = ([17:19-30], "__construct"); + sm_reactivity = None; + sm_type = + (Rwitness (root|readonly.php line 17, characters 19-29), + (Tfun + { ft_arity = (Fstandard ()); ft_tparams = []; + ft_where_constraints = []; + ft_params = + [{ fp_pos = [18:25-27]; fp_name = (Some "$y"); + fp_type = + { et_enforced = false; + et_type = + (Rhint (root|readonly.php line 18, characters 21-23), + (Tapply (([18:21-24], "\\Foo"), []))) + }; + fp_rx_annotation = None; + fp_flags = + (make_fp_flags ~mutability:None + ~accept_disposable:false ~has_default:false + ~mode:Typing_defs_core.FPnormal + ~ifc_external:false ~ifc_can_call:false + ~is_atom:false ~readonly:true); + } + ]; + ft_implicit_params = + { capability = (CapDefaults [17:19-30]) }; + ft_ret = + { et_enforced = false; + et_type = + (Rwitness (root|readonly.php line 17, characters 19-29), + (Tprim Tvoid)) + }; + ft_flags = + (make_ft_flags FSync None ~return_disposable:false + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); + ft_reactive = Nonreactive; + ft_ifc_decl = FDPolicied {PUBLIC} })); + sm_visibility = Public; sm_deprecated = None; + sm_flags = (empty) }); + sc_static_methods = []; + sc_methods = + [{ Shallow_decl_defs.sm_name = ([22:28-34], "getFoo"); + sm_reactivity = None; + sm_type = + (Rwitness (root|readonly.php line 22, characters 28-33), + (Tfun + { ft_arity = (Fstandard ()); ft_tparams = []; + ft_where_constraints = []; ft_params = []; + ft_implicit_params = + { capability = (CapDefaults [22:28-34]) }; + ft_ret = + { et_enforced = false; + et_type = + (Rhint (root|readonly.php line 22, characters 39-42), + (Tprim Tvoid)) + }; + ft_flags = + (make_ft_flags FSync None ~return_disposable:false + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:true); + ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} + })); + sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } + ]; + sc_user_attributes = []; sc_enum_type = None })) + ] + +They matched! diff --git a/hphp/hack/test/decl/readonly.php.typecheck.exp b/hphp/hack/test/decl/readonly.php.typecheck.exp new file mode 100644 index 00000000000..4269126fceb --- /dev/null +++ b/hphp/hack/test/decl/readonly.php.typecheck.exp @@ -0,0 +1 @@ +No errors diff --git a/hphp/hack/test/decl/ret_from_kind.php.exp b/hphp/hack/test/decl/ret_from_kind.php.exp index fc752004e5c..302f08e515e 100644 --- a/hphp/hack/test/decl/ret_from_kind.php.exp +++ b/hphp/hack/test/decl/ret_from_kind.php.exp @@ -18,7 +18,8 @@ }; ft_flags = (make_ft_flags FAsync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:16-29]; fe_php_std_lib = false })); ("\\no_hint_generator", @@ -46,7 +47,8 @@ }; ft_flags = (make_ft_flags FGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [5:10-27]; fe_php_std_lib = false })); ("\\no_hint_async_generator", @@ -74,7 +76,8 @@ }; ft_flags = (make_ft_flags FAsyncGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:16-39]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/return_disposable.php.exp b/hphp/hack/test/decl/return_disposable.php.exp index 9fbe2b73ece..d84b4cb83cc 100644 --- a/hphp/hack/test/decl/return_disposable.php.exp +++ b/hphp/hack/test/decl/return_disposable.php.exp @@ -28,7 +28,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -54,7 +55,8 @@ }; ft_flags = (make_ft_flags FAsync None ~return_disposable:true - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [8:16-19]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/returns_void_to_rx.php.exp b/hphp/hack/test/decl/returns_void_to_rx.php.exp index af6ab70d5c3..d8b2a662eb1 100644 --- a/hphp/hack/test/decl/returns_void_to_rx.php.exp +++ b/hphp/hack/test/decl/returns_void_to_rx.php.exp @@ -15,7 +15,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:true); + ~returns_mutable:false ~returns_void_to_rx:true + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [4:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/rewritten_tparams.php.exp b/hphp/hack/test/decl/rewritten_tparams.php.exp index d1b1ec2fdc2..33ab8f81b17 100644 --- a/hphp/hack/test/decl/rewritten_tparams.php.exp +++ b/hphp/hack/test/decl/rewritten_tparams.php.exp @@ -58,7 +58,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -66,7 +67,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [5:12-14]; fp_name = (Some "$v"); fp_type = @@ -79,7 +81,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -100,7 +103,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-11]; fe_php_std_lib = false })); ("\\g", @@ -149,7 +153,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -165,7 +170,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [10:10-11]; fe_php_std_lib = false })); ("\\h", @@ -232,7 +238,8 @@ (make_ft_flags FSync None ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })))) }; @@ -240,7 +247,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [16:13-15]; fp_name = (Some "$v"); fp_type = @@ -255,7 +263,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -276,7 +285,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [14:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/rx.php.exp b/hphp/hack/test/decl/rx.php.exp index f8a423f19dd..ba6ebc6ab0c 100644 --- a/hphp/hack/test/decl/rx.php.exp +++ b/hphp/hack/test/decl/rx.php.exp @@ -35,8 +35,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Pure {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -44,7 +44,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [5:19-21]) }; @@ -56,7 +57,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -87,7 +89,8 @@ ft_flags = (make_ft_flags FSync None ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -95,7 +98,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -108,7 +112,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -139,7 +144,8 @@ ft_flags = (make_ft_flags FSync None ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Shallow {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -147,7 +153,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -160,7 +167,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -191,7 +199,8 @@ ft_flags = (make_ft_flags FSync None ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Local {}; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -199,7 +208,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -212,7 +222,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/self_in_type_constant.php.exp b/hphp/hack/test/decl/self_in_type_constant.php.exp index 61902315ec3..7e62de2f180 100644 --- a/hphp/hack/test/decl/self_in_type_constant.php.exp +++ b/hphp/hack/test/decl/self_in_type_constant.php.exp @@ -89,7 +89,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = abstract diff --git a/hphp/hack/test/decl/self_param_mutability.php.exp b/hphp/hack/test/decl/self_param_mutability.php.exp index 9068a3e5f99..e57b2e02230 100644 --- a/hphp/hack/test/decl/self_param_mutability.php.exp +++ b/hphp/hack/test/decl/self_param_mutability.php.exp @@ -27,7 +27,8 @@ (make_ft_flags FSync (Some Typing_defs_core.Param_borrowed_mutable) ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false ~returns_readonly:false + ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -50,7 +51,8 @@ (make_ft_flags FSync (Some Typing_defs_core.Param_maybe_mutable) ~return_disposable:false ~returns_mutable:false - ~returns_void_to_rx:false); + ~returns_void_to_rx:false ~returns_readonly:false + ~readonly_this:false); ft_reactive = Reactive {}; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/shapes.php.exp b/hphp/hack/test/decl/shapes.php.exp index c9ed079b8fa..36b60f3d869 100644 --- a/hphp/hack/test/decl/shapes.php.exp +++ b/hphp/hack/test/decl/shapes.php.exp @@ -52,7 +52,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [5:10-21]) }; @@ -64,7 +65,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [5:10-21]; fe_php_std_lib = false })); ("\\returns_shape", @@ -87,7 +89,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [9:10-23]) }; @@ -112,7 +115,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-23]; fe_php_std_lib = false })); ("\\generic_shape", @@ -146,7 +150,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [15:10-23]) }; @@ -163,7 +168,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [15:10-23]; fe_php_std_lib = false })); ("\\TaggedCoordinate", diff --git a/hphp/hack/test/decl/soft_reified.php.exp b/hphp/hack/test/decl/soft_reified.php.exp index 0ec715efae5..6b82a5825c6 100644 --- a/hphp/hack/test/decl/soft_reified.php.exp +++ b/hphp/hack/test/decl/soft_reified.php.exp @@ -25,7 +25,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-14]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/soft_type_hint.php.exp b/hphp/hack/test/decl/soft_type_hint.php.exp index cc242c01f0d..7e1dfd60062 100644 --- a/hphp/hack/test/decl/soft_type_hint.php.exp +++ b/hphp/hack/test/decl/soft_type_hint.php.exp @@ -18,7 +18,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [3:10-11]) }; @@ -30,7 +31,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-11]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/static_method_call_with_explicit_targ.php.exp b/hphp/hack/test/decl/static_method_call_with_explicit_targ.php.exp index 443f6ade6b9..7955a954976 100644 --- a/hphp/hack/test/decl/static_method_call_with_explicit_targ.php.exp +++ b/hphp/hack/test/decl/static_method_call_with_explicit_targ.php.exp @@ -24,7 +24,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -53,7 +54,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [11:43-45]; fp_name = (Some "$b"); fp_type = @@ -66,8 +68,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -80,7 +82,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/tparams_on_class_and_method.php.exp b/hphp/hack/test/decl/tparams_on_class_and_method.php.exp index 7ca51c9cd6b..bf85071bda9 100644 --- a/hphp/hack/test/decl/tparams_on_class_and_method.php.exp +++ b/hphp/hack/test/decl/tparams_on_class_and_method.php.exp @@ -41,7 +41,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [4:35-37]; fp_name = (Some "$c"); fp_type = @@ -54,7 +55,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [4:19-20]) }; @@ -71,7 +73,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) }; @@ -100,7 +103,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); }; { fp_pos = [8:35-37]; fp_name = (Some "$d"); fp_type = @@ -113,8 +117,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = @@ -132,7 +136,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/traits.php.exp b/hphp/hack/test/decl/traits.php.exp index 4ed640f502e..dc3b7232d39 100644 --- a/hphp/hack/test/decl/traits.php.exp +++ b/hphp/hack/test/decl/traits.php.exp @@ -25,7 +25,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -62,7 +63,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } @@ -96,7 +98,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/tuples.php.exp b/hphp/hack/test/decl/tuples.php.exp index 38ec2f2accf..e9a58dbf142 100644 --- a/hphp/hack/test/decl/tuples.php.exp +++ b/hphp/hack/test/decl/tuples.php.exp @@ -35,7 +35,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [5:10-21]) }; @@ -47,7 +48,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [5:10-21]; fe_php_std_lib = false })); ("\\returns_tuple", @@ -70,7 +72,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [9:10-23]) }; @@ -87,7 +90,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-23]; fe_php_std_lib = false })); ("\\generic_tuple", @@ -121,7 +125,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [13:10-23]) }; @@ -138,7 +143,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [13:10-23]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/type_param_attrs.php.exp b/hphp/hack/test/decl/type_param_attrs.php.exp index 0b73160a6a6..92ad2b50679 100644 --- a/hphp/hack/test/decl/type_param_attrs.php.exp +++ b/hphp/hack/test/decl/type_param_attrs.php.exp @@ -28,7 +28,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/typeconst_property_promotion.php.exp b/hphp/hack/test/decl/typeconst_property_promotion.php.exp index 8dd72e8fdd1..faef57c7b24 100644 --- a/hphp/hack/test/decl/typeconst_property_promotion.php.exp +++ b/hphp/hack/test/decl/typeconst_property_promotion.php.exp @@ -49,7 +49,7 @@ (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false - ~ifc_can_call:false ~is_atom:false); + ~ifc_can_call:false ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -62,7 +62,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/unnamed_variadic_method_parameter.php.exp b/hphp/hack/test/decl/unnamed_variadic_method_parameter.php.exp index b3868508849..92322c95d20 100644 --- a/hphp/hack/test/decl/unnamed_variadic_method_parameter.php.exp +++ b/hphp/hack/test/decl/unnamed_variadic_method_parameter.php.exp @@ -26,8 +26,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } )); ft_tparams = []; ft_where_constraints = []; @@ -43,7 +43,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [4:19-20]) }; @@ -55,7 +56,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; sm_flags = (empty) } diff --git a/hphp/hack/test/decl/use_type.php.exp b/hphp/hack/test/decl/use_type.php.exp index a88b7db25ae..33d9222ef53 100644 --- a/hphp/hack/test/decl/use_type.php.exp +++ b/hphp/hack/test/decl/use_type.php.exp @@ -55,7 +55,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [17:12-13]) }; @@ -67,7 +68,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [17:12-13]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/variadic_parameter.php.exp b/hphp/hack/test/decl/variadic_parameter.php.exp index ea83490c161..20d460a9fb4 100644 --- a/hphp/hack/test/decl/variadic_parameter.php.exp +++ b/hphp/hack/test/decl/variadic_parameter.php.exp @@ -28,7 +28,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } )); ft_tparams = []; ft_where_constraints = []; @@ -43,7 +43,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })) }; @@ -51,7 +52,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [3:10-14]) }; @@ -63,7 +65,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-14]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/wildcard_invalid.php.exp b/hphp/hack/test/decl/wildcard_invalid.php.exp index 4fa986598c5..63a3f0038d3 100644 --- a/hphp/hack/test/decl/wildcard_invalid.php.exp +++ b/hphp/hack/test/decl/wildcard_invalid.php.exp @@ -18,7 +18,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [3:10-13]) }; @@ -30,7 +31,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-13]; fe_php_std_lib = false })); ("\\bar", @@ -53,7 +55,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [6:10-13]) }; @@ -65,7 +68,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [6:10-13]; fe_php_std_lib = false })); ("\\C", @@ -108,7 +112,7 @@ ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal ~ifc_external:false ~ifc_can_call:false - ~is_atom:false); + ~is_atom:false ~readonly:false); } ]; ft_implicit_params = @@ -121,7 +125,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Public; sm_deprecated = None; diff --git a/hphp/hack/test/decl/wildcard_invalid_targ.php.exp b/hphp/hack/test/decl/wildcard_invalid_targ.php.exp index e81becf0a56..c79a1a335ef 100644 --- a/hphp/hack/test/decl/wildcard_invalid_targ.php.exp +++ b/hphp/hack/test/decl/wildcard_invalid_targ.php.exp @@ -83,7 +83,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [9:10-14]) }; @@ -98,7 +99,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [9:10-14]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/xhp.php.exp b/hphp/hack/test/decl/xhp.php.exp index 1173d0d59a8..aef84873a94 100644 --- a/hphp/hack/test/decl/xhp.php.exp +++ b/hphp/hack/test/decl/xhp.php.exp @@ -62,7 +62,8 @@ fp_flags = (make_fp_flags ~mutability:None ~accept_disposable:false ~has_default:false ~mode:Typing_defs_core.FPnormal - ~ifc_external:false ~ifc_can_call:false ~is_atom:false); + ~ifc_external:false ~ifc_can_call:false ~is_atom:false + ~readonly:false); } ]; ft_implicit_params = { capability = (CapDefaults [7:10-33]) }; @@ -73,7 +74,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-33]; fe_php_std_lib = false })) ] diff --git a/hphp/hack/test/decl/xhp_self.php.exp b/hphp/hack/test/decl/xhp_self.php.exp index fadf2232357..a132d877e1d 100644 --- a/hphp/hack/test/decl/xhp_self.php.exp +++ b/hphp/hack/test/decl/xhp_self.php.exp @@ -73,7 +73,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); sm_visibility = Protected; sm_deprecated = None; diff --git a/hphp/hack/test/decl/yield_deeper.php.exp b/hphp/hack/test/decl/yield_deeper.php.exp index 9204ea0cee7..e6b255014c6 100644 --- a/hphp/hack/test/decl/yield_deeper.php.exp +++ b/hphp/hack/test/decl/yield_deeper.php.exp @@ -23,7 +23,8 @@ }; ft_flags = (make_ft_flags FGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [3:10-11]; fe_php_std_lib = false })); ("\\g", @@ -43,7 +44,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [7:10-11]; fe_php_std_lib = false })); ("\\h", @@ -63,7 +65,8 @@ }; ft_flags = (make_ft_flags FSync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [13:10-11]; fe_php_std_lib = false })); ("\\i", @@ -86,7 +89,8 @@ }; ft_flags = (make_ft_flags FAsync None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [19:16-17]; fe_php_std_lib = false })); ("\\j", @@ -112,7 +116,8 @@ }; ft_flags = (make_ft_flags FAsyncGenerator None ~return_disposable:false - ~returns_mutable:false ~returns_void_to_rx:false); + ~returns_mutable:false ~returns_void_to_rx:false + ~returns_readonly:false ~readonly_this:false); ft_reactive = Nonreactive; ft_ifc_decl = FDPolicied {PUBLIC} })); fe_pos = [26:16-17]; fe_php_std_lib = false })) ] -- 2.11.4.GIT