Ban Tintersection on RHS of asnightly-2021.02.02
commit70fae59a10b6bdddb57c0c17262119fcd44d101c
authorVassil Mladenov <[email protected]>
Tue, 2 Feb 2021 01:23:32 +0000 (1 17:23 -0800)
committerFacebook GitHub Bot <[email protected]>
Tue, 2 Feb 2021 01:28:00 +0000 (1 17:28 -0800)
tree5785c22422d9ea976666367dfb00146cdbc58862
parentdab75de7821f5664a8da27a93d0cbc22bb0c4c16
Ban Tintersection on RHS of as

Summary: Bans `3 as (A & B)`. Context constants use Tintersection for their types; we don't want those to be enforceable.

Reviewed By: losvald, Wilfred

Differential Revision: D26079191

fbshipit-source-id: 39543298a751519c1e68da84ee65cc3e9e70885a
hphp/hack/src/typing/typing_enforceable_hint.ml
hphp/hack/test/typecheck/coeffects/as.php [new file with mode: 0644]
hphp/hack/test/typecheck/coeffects/as.php.exp [new file with mode: 0644]