Move tyvar expansion into desugar_simple_intersection
commitdab394574efd3c8c0a6e8494e41adc3c95ff9762
authorVassil Mladenov <vmladenov@fb.com>
Fri, 8 Jan 2021 00:40:09 +0000 (7 16:40 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 8 Jan 2021 00:43:37 +0000 (7 16:43 -0800)
tree8bedcf98dd402b5a5ccd59adc6ccec5f78b171a5
parent5f611b6edc127e94c9b3dc0cd87cc4bbf227c9b4
Move tyvar expansion into desugar_simple_intersection

Summary: Since we filter out type vars from bounds, this expansion can now safely go into the recursive desugaring function. Changed List.sort to List.dedup_and_sort because otherwise in the first case we were getting {Output, Output, WriteProperty, WriteProperty}

Reviewed By: DavidSnider

Differential Revision: D25839754

fbshipit-source-id: 888b2f223c832c28bf1313da0b52bfa31d6bc3f6
hphp/hack/src/typing/typing_print.ml
hphp/hack/test/typecheck/coeffects/tyvars1.php [new file with mode: 0644]
hphp/hack/test/typecheck/coeffects/tyvars1.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/coeffects/tyvars2.php [new file with mode: 0644]
hphp/hack/test/typecheck/coeffects/tyvars2.php.exp [new file with mode: 0644]