Ban object cast in strict mode
commit7eae7c0ca9b5c8a88d320537068e7c8322a0d328
authorKunal Mehta <kunalm@fb.com>
Mon, 1 Oct 2018 16:15:35 +0000 (1 09:15 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 1 Oct 2018 16:42:52 +0000 (1 09:42 -0700)
treefb8331d9356d26f6b2d31bc3e1316a0f512535d9
parent74bd0da6ad4be510ceae83da996986b42378e1ca
Ban object cast in strict mode

Summary: `object` isn't a valid typehint in Hack; you should not be able to cast to it. This bans it in strict mode.

Differential Revision: D10020815

fbshipit-source-id: f814361002b76699e2db878df7b0358681eafbaf
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors_sig.ml
hphp/hack/src/naming/naming.ml
hphp/hack/test/typecheck/object_cast.php [new file with mode: 0644]
hphp/hack/test/typecheck/object_cast.php.exp [new file with mode: 0644]