Fix Type::operator<= with specializationsnightly-2021.09.21
commitce7db9c2fa2692baf25b5fcf8bdbbd84ab9e6c22
authorRick Lavoie <rlavoie@fb.com>
Mon, 20 Sep 2021 23:24:32 +0000 (20 16:24 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 21 Sep 2021 00:22:47 +0000 (20 17:22 -0700)
treeaa0524968be9bbc483351ad40acf98084cc2db1d
parent7dfdefcbeccde9614e245f266a0403ec8fb1c531
Fix Type::operator<= with specializations

Summary:
The subset operator was always comparing specializations between the
two types, even if the lhs didn't have one. This meant that something
like TUninit was not being treated as a subset of ClassSpec() | TNull
(which is wrong). Only compare specializations if the lhs supports
one.

Reviewed By: jano

Differential Revision: D31060210

fbshipit-source-id: babe3bd1a1e560f6e633ebb2593db13defcfff0a
hphp/runtime/test/type.cpp
hphp/runtime/vm/jit/type.cpp