Check that the right operand of instanceof is not an enum
commitb4bf81b4b34c7db700b1875f1f3888c45fee1da1
authorXiao Shi <xshi@fb.com>
Tue, 9 Jun 2015 17:18:38 +0000 (9 10:18 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Tue, 9 Jun 2015 17:32:16 +0000 (9 10:32 -0700)
tree68f2c85aeb208f605a15eb5f8d46d77642215059
parentbdcbb9a570158fd234d0c234fbf95fee16cbca5e
Check that the right operand of instanceof is not an enum

Summary: In Hack typecheck, throw an error if the right operand of instanceof is an enum type.

Reviewed By: @dlreeves

Differential Revision: D2133978
hphp/hack/src/typing/typing.ml
hphp/hack/test/typecheck/instanceof_enum.php [new file with mode: 0644]
hphp/hack/test/typecheck/instanceof_enum.php.exp [new file with mode: 0644]