add support for enums
commitc44d974d93b40864f3eee6103b05e860047ed828
authorNoam Zilberstein <noamz@fb.com>
Thu, 17 Jun 2021 16:24:51 +0000 (17 09:24 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 17 Jun 2021 16:27:19 +0000 (17 09:27 -0700)
tree6043d74ac3e89e7d2bd3f81163b91c1b0ee9fcd3
parent905f95d976caf0631b4075a8fd23e7eb4eca5128
add support for enums

Summary: I added some tests and discovered that we need to do additional checks in typing_wellformedness. It appears that enum types get resolved to newtypes, so we need to validate visbility in that case as well.

Reviewed By: andrewjkennedy

Differential Revision: D29164989

fbshipit-source-id: 18f88bb1a7f77028743c8394b859034c3448cf82
hphp/hack/src/naming/naming_special_names.ml
hphp/hack/src/typing/typing_type_wellformedness.ml
hphp/hack/test/typecheck/modules/module_enums.php [new file with mode: 0644]
hphp/hack/test/typecheck/modules/module_enums.php.exp [new file with mode: 0644]