Make note of contravariance in error messages
commit04f1949533c83161b78f3419c289c18a4675dd63
authorJez Ng <jezng@fb.com>
Thu, 9 Apr 2015 18:04:39 +0000 (9 11:04 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Sat, 11 Apr 2015 01:00:44 +0000 (10 18:00 -0700)
tree207b2aecbf6061b0929e91a5b47dbca9f49a418f
parent014d516aa83ce03e14a86fcfd129449874c135d5
Make note of contravariance in error messages

Summary: I believe that this makes error messages easier to understand

We could add a message for covariance and invariance as well,
but I think those are far more intuitive relations, so it's not as
necessary.

Reviewed By: @jwatzman

Differential Revision: D1983649
hphp/hack/src/typing/typing_subtype.ml
hphp/hack/src/utils/errors.ml
hphp/hack/src/utils/errors.mli
hphp/hack/test/typecheck/contravariance1.php.exp