Allow compilation of `as` constraints on concrete type constants
Summary:
This re-allows `as` constraints on concrete type constants in the runtime; they just compile to plain concrete type constants. This was the original intent of {
D31328780 (https://github.com/facebook/hhvm/commit/
4126b29970690b64ab171ffae6468c78bd4b1180)} with the use of `Self::raise_hh_error` and a NastCheck error code instead of `raise_parsing_error`. However, per the discussion, it looks like `raise_hh_error` erroneously raises an empty parse error during compilation; task filed T103167294.
This gives us the option to re-allow `as` constraints on concrete type constants without changing the runtime once redeclarations are eliminated, since they have a valid use case of constraining shape type constants across hierarchies.
Reviewed By: kavoor
Differential Revision:
D31589120
fbshipit-source-id:
57462291f41820ff87729e16129a2d436f42a58e