Explicitly check for non-empty arrays before creating them.
commite862dc5cd8f4c86c3d761b507b22ef0da0576eb0
authorMark Williams <mwilliams@fb.com>
Thu, 16 Mar 2017 19:41:45 +0000 (16 12:41 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 16 Mar 2017 19:56:31 +0000 (16 12:56 -0700)
tree6d987e7f6189129bccd45a9914d67da64cd82da0
parentc46cf14e92e7e1dbe9b13231a9210ae52e1d055d
Explicitly check for non-empty arrays before creating them.

Summary:
DataTag::ArrayLikePacked is only used for Vecs, Dicts, and Arrays. But
it can be used with maybe-empty Vecs, Dicts and Arrays, so we need a
final else-if.

Reviewed By: kodafb

Differential Revision: D4721787

fbshipit-source-id: 15704b6f7422b11e73dc1210f7a4bb99f1b6b547
hphp/hhbbc/type-system.cpp
hphp/test/slow/vec/bad-type-conversion.php [new file with mode: 0644]
hphp/test/slow/vec/bad-type-conversion.php.expect [new file with mode: 0644]