Add back module arity check
commit22fc5ea2e13c297062a85c1df056add1782f5dd3
authorHunter Goldstein <hgoldstein@fb.com>
Tue, 14 Dec 2021 20:43:18 +0000 (14 12:43 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 14 Dec 2021 20:45:01 +0000 (14 12:45 -0800)
tree36417354c757f796da0fc661a25737b6aa6474de
parentc9c5a3fee9aabfaa181334a6e456eb5bbc6dbac7
Add back module arity check

Summary:
This was removed when moving to file level attributes ... because we aggressively strip file level attributes from the AST, so the check in `Attribute_nast_check` was doing nothing.

This seems like an OK place to add such a check, but I see arguments for putting this somewhere in `naming.ml`.

Reviewed By: Wilfred

Differential Revision: D32962855

fbshipit-source-id: 427c666ebf34805ed7d072e6e6e57fab8630479c
hphp/hack/src/parser/rust_parser_errors.rs
hphp/hack/src/parser/syntax_error.rs
hphp/hack/test/typecheck/modules/module_bad_arity.php.exp