Support like-types in the compiler
commitc31cd79fb351037d0a275dc8187ec2a26122309c
authorKunal Mehta <kunalm@fb.com>
Fri, 5 Apr 2019 17:20:39 +0000 (5 10:20 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 5 Apr 2019 17:30:06 +0000 (5 10:30 -0700)
tree9eeda4bc54a7c1205b8bb078cc7bae175959d7f4
parent851a4b22e6ab6679f65668253c5cc3d28b0c36ec
Support like-types in the compiler

Summary:
This adds initial support for like-types in the compiler. For now, it seems pretty straightforward—we simply treat like-types as `mixed` when emitting HHBC.

Future diffs will add like-types to TypeStructure so that we may use them in is/as expressions, reified generics, and type aliases.

Reviewed By: vassilmladenov

Differential Revision: D14783789

fbshipit-source-id: c8709d0dc308c75dc5464938817b6c7e7fac449f
14 files changed:
hphp/hack/src/hhbc/emit_type_hint.ml
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/test/slow/like_types/awaitable1.php [new file with mode: 0644]
hphp/test/slow/like_types/awaitable1.php.expectf [new file with mode: 0644]
hphp/test/slow/like_types/awaitable2.php [new file with mode: 0644]
hphp/test/slow/like_types/awaitable2.php.expect [new file with mode: 0644]
hphp/test/slow/like_types/awaitable3.php [new file with mode: 0644]
hphp/test/slow/like_types/awaitable3.php.expect [new file with mode: 0644]
hphp/test/slow/like_types/parameter.php [new file with mode: 0644]
hphp/test/slow/like_types/parameter.php.expect [new file with mode: 0644]
hphp/test/slow/like_types/property.php [new file with mode: 0644]
hphp/test/slow/like_types/property.php.expect [new file with mode: 0644]
hphp/test/slow/like_types/return.php [new file with mode: 0644]
hphp/test/slow/like_types/return.php.expect [new file with mode: 0644]