Fix HADVAs bug: reified generics typechecks
commit7ed06abd446c5a8898c469c0de3b667603424959
authorShaunak Kishore <kshaunak@fb.com>
Fri, 18 Dec 2020 19:57:12 +0000 (18 11:57 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 18 Dec 2020 19:59:08 +0000 (18 11:59 -0800)
tree807f10d15627cad763e644d3d99ecc8f776a8351
parentb7006ef62ca894b191c78863ee99621bb3a835f1
Fix HADVAs bug: reified generics typechecks

Summary:
Oof. If we didn't fix this bug, every time we enforce a varray or darray typehint, we'd fatal post-HADVAs.

Note that, like varray and darray typehints pre-HADVAs, we allow both vecs and dicts to past post-HADVAs. That behavior isn't ideal but it's something we have to address post-unification when we fix typehints. It shouldn't be too bad to address it at that step - these typehints are mostly obeyed.

Reviewed By: arnabde03

Differential Revision: D25640318

fbshipit-source-id: 4f0e8bc1cd4813d8557cafae26f32ea6f3a7de73
hphp/runtime/base/type-structure-helpers.cpp
hphp/test/slow/reified-generics/verify-param-darray-2.php [new file with mode: 0644]
hphp/test/slow/reified-generics/verify-param-darray-2.php.expectf [new file with mode: 0644]
hphp/test/slow/reified-generics/verify-param-darray-2.php.hphp_opts [new file with mode: 0644]
hphp/test/slow/reified-generics/verify-param-darray-2.php.opts [new file with mode: 0644]
hphp/test/slow/reified-generics/verify-param-varray-1.php
hphp/test/slow/reified-generics/verify-param-varray-2.php [copied from hphp/test/slow/reified-generics/verify-param-varray-1.php with 65% similarity]
hphp/test/slow/reified-generics/verify-param-varray-2.php.expectf [new file with mode: 0644]
hphp/test/slow/reified-generics/verify-param-varray-2.php.hphp_opts [new file with mode: 0644]
hphp/test/slow/reified-generics/verify-param-varray-2.php.opts [new file with mode: 0644]