Fix jit bug when lowering AKExists for collections and null keys
commit843d67c8d499bf5b6d9f391c364334ab2b73f676
authorJoseph Griego <jgriego@fb.com>
Mon, 3 Dec 2018 17:01:38 +0000 (3 09:01 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 3 Dec 2018 17:10:36 +0000 (3 09:10 -0800)
tree162d21b7fa07067d888f5a83b63f23f7f82f0700
parenta0f7681666279ec4bfc22b86c68e9baa7a68b013
Fix jit bug when lowering AKExists for collections and null keys

Summary:
When the key is null, we should only coerce it to "" and raise the
notice if the array is known to be a PHP array and not a collection. When the
collection is a collection or hack array, we are supposed to raise an exception
here--this wasn't happening.

Reviewed By: alexeyt

Differential Revision: D13270289

fbshipit-source-id: 8c40df4276cb591354d5bf9bee6ab02ca435bfcb
hphp/runtime/vm/jit/irgen-builtin.cpp
hphp/test/slow/hack_arr_compat/array_key_cast_collection_null_key.php [new file with mode: 0644]
hphp/test/slow/hack_arr_compat/array_key_cast_collection_null_key.php.expectf [new file with mode: 0644]
hphp/test/slow/hack_arr_compat/array_key_cast_collection_null_key.php.hphp_opts [new file with mode: 0644]
hphp/test/slow/hack_arr_compat/array_key_cast_collection_null_key.php.opts [new file with mode: 0644]