Add a NAST check for conflicting memoize attributesnightly-2022.08.17
commit21598ba02ad84b923253dd0bbd98a5d185fed107
authorWilfred Hughes <wilfred@fb.com>
Wed, 17 Aug 2022 00:59:43 +0000 (16 17:59 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 17 Aug 2022 00:59:43 +0000 (16 17:59 -0700)
tree20cc50702a7fdab09b90d03d90c5d1f722196fc0
parentee48001f6d52a5ef6127133dd2675cee5e62a7a0
Add a NAST check for conflicting memoize attributes

Summary: It doesn't make sense to have both `__Memoize` and `__MemoizeLSB`. Error if both are present.

Reviewed By: viratyosin

Differential Revision: D38765853

fbshipit-source-id: a04fced3daf06571b194f9f5a03075d61f30f6c9
hphp/hack/src/errors/error_codes.ml
hphp/hack/src/errors/nast_check_error.ml
hphp/hack/src/errors/nast_check_error.mli
hphp/hack/src/oxidized/gen/error_codes.rs
hphp/hack/src/typing/nast_check/attribute_nast_checks.ml
hphp/hack/src/typing/nast_check/attribute_nast_checks.mli [new file with mode: 0644]
hphp/hack/test/typecheck/attributes/duplicate_memoize.php [new file with mode: 0644]
hphp/hack/test/typecheck/attributes/duplicate_memoize.php.exp [new file with mode: 0644]