Make SDT static methods supportdyn
commitd957bf174c56f9f5bd4b7b5d32358f61b8dce416
authorScott Owens <sowens@fb.com>
Mon, 4 Apr 2022 15:33:09 +0000 (4 08:33 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 4 Apr 2022 15:33:09 +0000 (4 08:33 -0700)
tree08c71ae4334ff526aa8e58b67928d454de73b0fa
parentf24b96812043dcdaf3afe21d7bfef0ae180ac864
Make SDT static methods supportdyn

Summary: Static methods that support dynamic type were being intersected with `dynamic` rather than tagged with `supportdyn` which is what top-level functions get. They should be treated similarly. This regresses one test where the intersection was necessary, but lets us use the like-type function rule, which is likely to be more important in practice, given that is the case for top-level functions.

Reviewed By: andrewjkennedy

Differential Revision: D35316385

fbshipit-source-id: b74dc0b924b3f0444d0edddcfdddea26e9fd196c
hphp/hack/src/typing/tast_check/readonly_check.ml
hphp/hack/src/typing/tast_check/reified_check.ml
hphp/hack/src/typing/typing.ml
hphp/hack/test/sound_dynamic/typing/completeness_bugs/static_method_1.bad.php [moved from hphp/hack/test/sound_dynamic/typing/static_method_1.good.php with 100% similarity]
hphp/hack/test/sound_dynamic/typing/completeness_bugs/static_method_1.bad.php.exp [new file with mode: 0644]
hphp/hack/test/sound_dynamic/typing/static_sdt.good.php [new file with mode: 0644]
hphp/hack/test/sound_dynamic/typing/static_sdt.good.php.exp [moved from hphp/hack/test/sound_dynamic/typing/static_method_1.good.php.exp with 100% similarity]
hphp/hack/test/typecheck/class_get_union.php.pess_disabled [new file with mode: 0644]
hphp/hack/test/typecheck/readonly/function_pointer_readonly_this.php.pess_disabled [new file with mode: 0644]