Pretty print capabilities in generic subtyping errors
commit1477fbae1961a615ebbfa0e60f741f5514edd438
authorVassil Mladenov <vmladenov@fb.com>
Wed, 23 Dec 2020 22:21:18 +0000 (23 14:21 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 23 Dec 2020 22:22:56 +0000 (23 14:22 -0800)
tree795c767bc3f35c8d77dd8d52203c7d5515164f2e
parent2a0cbc6f6129cc3ab7bad5bbfafa0772b1abd143
Pretty print capabilities in generic subtyping errors

Summary: Previously, the subtyping would proceed with standard decomposition of types and report the error, so the error would be something like `Expected \HH\Capabilities\WriteProp but got mixed`. This interrupts the error and reports the full coeffect list on both sides. Using a different code because we don't want this to be fixmeable unlike 4110.

Reviewed By: DavidSnider

Differential Revision: D25695994

fbshipit-source-id: 89c1e2609d20a6bdd36bc18a0100b88cba81a43f
hphp/hack/src/errors/error_codes.ml
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors.mli
hphp/hack/src/oxidized/gen/error_codes.rs
hphp/hack/src/typing/typing_subtype.ml
hphp/hack/test/typecheck/coeffects/pretty_subtyping.php [new file with mode: 0644]
hphp/hack/test/typecheck/coeffects/pretty_subtyping.php.exp [new file with mode: 0644]