Skip to content

Commit df2eabe

Browse files
Sheila Jimenezmeta-codesync[bot]
authored andcommitted
Enable methods on strings
Summary: This diff turns on methods on strings for Zoncolan by adding an option to enable the methods for unit tests, removing some checks that would skip the new string class, and adding a couple new models Must be landed after D92323232 Reviewed By: marat-turaev Differential Revision: D92170162 fbshipit-source-id: 5724350f009af502b0a4725f394cd6002af6e081
1 parent 7c47a67 commit df2eabe

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

hphp/hack/src/hh_single_ai.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ let parse_options () =
5757
in
5858
let allowed_fixme_codes_strict = ref None in
5959
let allowed_decl_fixme_codes = ref None in
60+
let ignore_string_methods = ref true in
6061
let options =
6162
[
6263
( "--extra-builtin",
@@ -73,6 +74,9 @@ let parse_options () =
7374
Arg.String
7475
(fun s -> allowed_decl_fixme_codes := Some (comma_string_to_iset s)),
7576
"List of fixmes that are allowed in declarations." );
77+
( "--enable-string-methods",
78+
Arg.Unit (fun () -> ignore_string_methods := false),
79+
" Enable methods on string primitive types" );
7680
]
7781
in
7882
let options = Arg.align ~limit:25 options in
@@ -107,6 +111,7 @@ let parse_options () =
107111
allowed_decl_fixme_codes =
108112
Option.value !allowed_decl_fixme_codes ~default:ISet.empty;
109113
allow_unstable_features = true;
114+
ignore_string_methods = !ignore_string_methods;
110115
}
111116
in
112117
let tcopt =

0 commit comments

Comments
 (0)