Permalink
Browse files

Don't require experimental option for regex strings

Summary: These have shipped.

Reviewed By: vassilmladenov

Differential Revision: D10129310

fbshipit-source-id: 508de46bf4ed1764b9986784e5103a177c4082e9
  • Loading branch information...
fredemmott authored and hhvm-bot committed Oct 1, 2018
1 parent 14b8000 commit d7ed929db174ab51c8e831d075aa095aebfe6864
@@ -134,12 +134,6 @@ let tco_experimental_null_coalesce_assignment = "null_coalesce_assignment"
*)
let tco_experimental_reified_generics = "reified_generics"
(**
* Enable specially typed regex strings (e.g. `re"\d"`).
*)
let tco_experimental_re_prefixed_strings = "re_prefixed_strings"
(**
* Enable declaration linearization
*)
@@ -164,7 +158,6 @@ let tco_experimental_all =
tco_experimental_void_is_type_of_null;
tco_experimental_null_coalesce_assignment;
tco_experimental_reified_generics;
tco_experimental_re_prefixed_strings;
tco_experimental_decl_linearization;
]
@@ -240,7 +240,6 @@ val tco_experimental_no_trait_reuse : string
val tco_experimental_void_is_type_of_null : string
val tco_experimental_null_coalesce_assignment : string
val tco_experimental_reified_generics : string
val tco_experimental_re_prefixed_strings : string
val tco_experimental_decl_linearization : string
val tco_experimental_all : SSet.t
val tco_migration_flags_all : SSet.t
@@ -55,8 +55,6 @@ let experimental_null_coalesce_assignment =
GlobalOptions.tco_experimental_null_coalesce_assignment
let experimental_reified_generics =
GlobalOptions.tco_experimental_reified_generics
let experimental_re_prefixed_strings =
GlobalOptions.tco_experimental_re_prefixed_strings
let experimental_decl_linearization =
GlobalOptions.tco_experimental_decl_linearization
@@ -1386,11 +1386,6 @@ and expr_
(Env.get_options env)
TypecheckerOptions.experimental_disable_shape_and_tuple_arrays in
let re_prefixed_strings_enabled =
TypecheckerOptions.experimental_feature_enabled
(Env.get_options env)
TypecheckerOptions.experimental_re_prefixed_strings in
let subtype_arraykey ~class_name ~key_pos env key_ty =
let ty_arraykey = Reason.Ridx_dict key_pos, Tprim Tarraykey in
Type.sub_type p (Reason.index_class class_name) env key_ty ty_arraykey in
@@ -1670,11 +1665,7 @@ and expr_
if n <> "re"
then begin
Errors.experimental_feature p
"String prefixes other than `re` (experimental) are not yet supported.";
expr_error env p (Reason.Rnone)
end else if not re_prefixed_strings_enabled
then begin
Errors.experimental_feature p "`re`-prefixed strings";
"String prefixes other than `re` are not yet supported.";
expr_error env p (Reason.Rnone)
end else
let env, te, ty = expr env e in
@@ -1,4 +1,4 @@
File "non_re_prefixed_string.php", line 4, characters 8-20:
Only `re`-prefixed strings allowed. (Parsing[1002])
File "non_re_prefixed_string.php", line 4, characters 8-20:
Cannot use experimental feature: String prefixes other than `re` (experimental) are not yet supported. (Other[0000])
Cannot use experimental feature: String prefixes other than `re` are not yet supported. (Other[0000])

0 comments on commit d7ed929

Please sign in to comment.