Relax enforcement requirement on public properties
commit0129e80396f2070b6f9ce8b672df912d577f768a
authorScott Owens <sowens@fb.com>
Thu, 23 Sep 2021 14:50:46 +0000 (23 07:50 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 23 Sep 2021 14:52:43 +0000 (23 07:52 -0700)
tree532b6b5e55d5bbc0052fd1300e6db3dc093acb7b
parent21bf2ba07fa3053f11bd6400b677fac0c4172549
Relax enforcement requirement on public properties

Summary: Previously, a public property had to have an enforceable type, or actually be syntactically `dynamic`. This loosens the restriction to allow the property to be merely equivalent to dynamic under dynamic-aware subtyping. This lets like-type properties of work, e.g., ~vec<int>.

Reviewed By: francesco-zappa-nardelli

Differential Revision: D31020953

fbshipit-source-id: 3cac9f5126ce684f1c84ced4016dd6e5d4c024ff
hphp/hack/src/typing/typing_dynamic.ml
hphp/hack/src/typing/typing_dynamic.mli
hphp/hack/src/typing/typing_object_get.ml
hphp/hack/src/typing/typing_toplevel.ml
hphp/hack/test/sound_dynamic/typing/prop.good.php [new file with mode: 0644]
hphp/hack/test/sound_dynamic/typing/prop.good.php.exp [new file with mode: 0644]