Allow direct readonly writes to static variables when they are marked readonly and cow
commitd6520899df0f007632fd5c8774604a64e52b7421
authorJames Wu <jjwu@fb.com>
Fri, 19 Nov 2021 22:14:23 +0000 (19 14:14 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 19 Nov 2021 22:16:18 +0000 (19 14:16 -0800)
tree8ff798f179dd45c85c262d30a0864cb8d095b668
parent58e253d2442ae44986f5917d833ba67a81083c39
Allow direct readonly writes to static variables when they are marked readonly and cow

Summary:
Before, we disallowed this unnecessarily, this just allows it.

Should be safe to add because no new errors can occur in www.

Reviewed By: oulgen

Differential Revision: D32477938

fbshipit-source-id: 22aa14ba3666e300b79e4777762faf7bbbd7eccd
hphp/hack/src/parser/readonly_check.rs
hphp/test/slow/readonly/readonly_static_prop_array.php [new file with mode: 0644]
hphp/test/slow/readonly/readonly_static_prop_array.php.expectf [new file with mode: 0644]
hphp/test/slow/readonly/readonly_static_prop_map.php [new file with mode: 0644]
hphp/test/slow/readonly/readonly_static_prop_map.php.expectf [new file with mode: 0644]