Add option to enable attributes when typechecking systemlibnightly-2020.04.23
commitd5bb48cf2ee7f3cfec3382198fada6770317d50f
authorAaron Orenstein <aorenste@fb.com>
Thu, 23 Apr 2020 01:12:50 +0000 (22 18:12 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 23 Apr 2020 01:26:00 +0000 (22 18:26 -0700)
treed3ffcf1ef15be3266ac7b9061831342873a5f29d
parent36ad364eabe37c003b75e2a51b26ae9c9af87f25
Add option to enable attributes when typechecking systemlib

Summary: There are some attributes which are used when typechecking systemlib but are undesirable for normal use.  This adds a ``--enable-systemlib-annotations`` flag to hh_single_type_check to support that case and also adds ``__Native`` and ``__ALWAYS_INLINE`` as two examples of those attributes.

Reviewed By: Wilfred, vassilmladenov

Differential Revision: D18940451

fbshipit-source-id: 8245af680bb30bf202e9c4ef4f842904757faa8f
13 files changed:
hphp/hack/src/hh_single_type_check.ml
hphp/hack/src/naming/naming_special_names.ml
hphp/hack/src/options/globalOptions.ml
hphp/hack/src/options/globalOptions.mli
hphp/hack/src/options/typecheckerOptions.ml
hphp/hack/src/oxidized/gen/global_options.rs
hphp/hack/src/oxidized/manual/global_options_impl.rs
hphp/hack/src/typing/typing_attributes.ml
hphp/hack/test/typecheck/systemlib/HH_FLAGS [new file with mode: 0644]
hphp/hack/test/typecheck/systemlib/attributes.php [new file with mode: 0644]
hphp/hack/test/typecheck/systemlib/attributes.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/systemlib_bad1.php [new file with mode: 0644]
hphp/hack/test/typecheck/systemlib_bad1.php.exp [new file with mode: 0644]