Add `Hole`s on 4064 (NullMemberRead) warnings
commit1a781f62d056f67ca3b0e0ad14d495363a2bc866
authorMichael Thomas <mjt@fb.com>
Wed, 25 Aug 2021 16:11:45 +0000 (25 09:11 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 25 Aug 2021 16:14:05 +0000 (25 09:14 -0700)
treeb2a75c0eeaab175d63bf79a3af41a46e03443b6b
parent025180b3a392727e041f5a148bc7c94951d6be15
Add `Hole`s on 4064 (NullMemberRead) warnings

Summary: This diff adds `Hole`s to possibly null receiver expressions upon method calls. It does not add a `Hole` when there is a corresponding property read since those warnings are generated during subtyping when `Has_member` constraints are checked and is therefore not possible to reify.

Reviewed By: madgen

Differential Revision: D30189303

fbshipit-source-id: 2ca4f2e484bd12bd82bc3a72b83c8bd90f16a702
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_object_get.ml
hphp/hack/test/holes/HH_FLAGS
hphp/hack/test/holes/null_member_read_method.php [new file with mode: 0644]
hphp/hack/test/holes/null_member_read_method.php.holes.exp [new file with mode: 0644]
hphp/hack/test/holes/null_member_read_property.php [new file with mode: 0644]
hphp/hack/test/holes/null_member_read_property.php.holes.exp [new file with mode: 0644]