Handle class const and int literal shape keys
commit34b0d7c6c70ca355d8d3c9f3f11dafcc15348e23
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Thu, 4 Jun 2020 17:57:29 +0000 (4 10:57 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 4 Jun 2020 18:11:26 +0000 (4 11:11 -0700)
tree02e842cb7f44b2dac07f67060eb926f2db7067c2
parent596dffcfc688a31bc4f0311ee8c20043b6b44812
Handle class const and int literal shape keys

Summary: Class consts are legal shape keys. Int literals used to be, but it seems they're a parse error now. Handle them anyway, for parity with OCaml decl.

Reviewed By: Wilfred

Differential Revision: D21689461

fbshipit-source-id: ff41982411434a7315c2410f96dab64a9c5cd61f
hphp/hack/src/decl/direct_decl_smart_constructors.rs
hphp/hack/test/decl/shape_expression_key_types.php [new file with mode: 0644]
hphp/hack/test/decl/shape_expression_key_types.php.exp [new file with mode: 0644]
hphp/hack/test/decl/shape_expression_key_types.php.typecheck.exp [new file with mode: 0644]
hphp/hack/test/decl/shape_type_key_types.php [new file with mode: 0644]
hphp/hack/test/decl/shape_type_key_types.php.exp [new file with mode: 0644]
hphp/hack/test/decl/shape_type_key_types.php.typecheck.exp [new file with mode: 0644]