Add compiler only attributes to disable readonly checking and coeffect local checking...
commit3014d9b2308da81db4ccbbc3093918b32b9a52a8
authorJames Wu <jjwu@fb.com>
Mon, 18 Oct 2021 16:32:49 +0000 (18 09:32 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 18 Oct 2021 16:34:44 +0000 (18 09:34 -0700)
treed5f933bbc9c3b989711c36736b5ed130a8b19983
parente234de431e62212d15749d7d493c14ed5b6d0dc5
Add compiler only attributes to disable readonly checking and coeffect local checking within systemlib

Summary:
Adding a `<<__IgnoreReadonlyLocalErrors>>`, `<<__IgnoreCoeffectLocalErrors>>` to ignore these local errors in systemlib files.

Also add a parse error for using these or <<__Native>> outside of systemlib functions

Also add readonly to a bunch of code in systemlib

Reviewed By: oulgen

Differential Revision: D31584462

fbshipit-source-id: df35dc21dd49dbd7769610e9234b96db22671224
21 files changed:
hphp/hack/hhi/collections/ImmVector.hhi
hphp/hack/hhi/collections/Set.hhi
hphp/hack/hhi/collections/Vector.hhi
hphp/hack/hhi/functions.hhi
hphp/hack/hhi/stdlib/builtins_variable.hhi
hphp/hack/src/naming/naming_special_names.ml
hphp/hack/src/naming/naming_special_names.rs
hphp/hack/src/options/parserOptions.ml
hphp/hack/src/oxidized/gen/parser_options.rs
hphp/hack/src/parser/aast_parser.rs
hphp/hack/src/parser/readonly_check.rs
hphp/hack/src/parser/rust_parser_errors.rs
hphp/hack/src/parser/rust_parser_errors_ffi.rs
hphp/hack/src/parser/syntax_error.rs
hphp/hack/test/typecheck/inout/pseudofunction_with_signature.php.exp
hphp/runtime/ext/array/ext_array.php
hphp/runtime/ext/collections/ext_collections-set.php
hphp/runtime/ext/collections/ext_collections-vector.php
hphp/runtime/ext/std/ext_std_variable.php
hphp/system/php/lang/readonly.ns.php
hphp/system/php/misc/idx.php