Produce error for incorrect mode syntax even when modes are disabled
commit63934803031152b03c6eb63565e297ecc9cc04e6
authorAndrew Kennedy <akenn@fb.com>
Fri, 14 Aug 2020 13:15:21 +0000 (14 06:15 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Aug 2020 13:20:51 +0000 (14 06:20 -0700)
treeb24ff2e9f56ce0f1f453502481ff7445803671f5
parent42bf4619d7667ff047a5ac43b3b6a94fc4068676
Produce error for incorrect mode syntax even when modes are disabled

Summary: Currently, we don't error badly-formed modes (e.g. `<?hh //struct`) under the `--disable-modes` flag. Hack files are thereby checked accidentally under "partial" mode, and accepted. Worse, it seems to lead to entities not getting registered in the decl heap, and consequent `Decl_not_found` exceptions.

Reviewed By: madgen

Differential Revision: D23128381

fbshipit-source-id: 27a8754c402e1d03dec0d92c1ff78ebad0a74d00
hphp/hack/src/parser/rust_parser_errors.rs
hphp/hack/test/typecheck/disable_modes/flag_true/badmode.php.exp