Do not make intersection when only single item in coeffect brackets
commit86164640cd5771169d39b1309e33c76a19e8adb1
authorVassil Mladenov <vmladenov@fb.com>
Fri, 11 Dec 2020 19:23:22 +0000 (11 11:23 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 11 Dec 2020 19:26:12 +0000 (11 11:26 -0800)
treefc117b7d283fe931289a579de7a37d12dc28c58f
parentbfffba5f3506c8199f65d325d1ed0ff5fdccf1d9
Do not make intersection when only single item in coeffect brackets

Summary: This makes some structural analysis of coeffect type hints simpler, as you can observe the hint directly instead of it being hidden under a layer of `Hintersection([hint])`.

Reviewed By: losvald

Differential Revision: D25410827

fbshipit-source-id: 30cabdfe02d06a6391fef956091b24c74b949514
hphp/hack/src/decl/direct_decl_smart_constructors.rs
hphp/hack/src/parser/lowerer/lowerer.rs
hphp/hack/test/tast/coeffects.php.exp
hphp/hack/test/typecheck/coeffects/closures_explicit.php.exp
hphp/hack/test/typecheck/coeffects/closures_implicit.php.exp
hphp/hack/test/typecheck/coeffects/higher_order_function.php.exp