Ban calling magic methods
commite5776fd0bcc3c792fb4f8660f886df2590231f76
authorMaggie Moss <maggiemoss@fb.com>
Thu, 1 Nov 2018 17:06:04 +0000 (1 10:06 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 1 Nov 2018 17:09:17 +0000 (1 10:09 -0700)
treeb64bd2a9c3ae739168c732d9b570bbb4e65817a4
parentd6aea18a4b8267ee0f474a8729c4e354d212be12
Ban calling magic methods

Summary: Add methods in `SN.Members.as_set` to the list of magic methods that are banned from being called directly.

Reviewed By: kmeht

Differential Revision: D10344589

fbshipit-source-id: 71cc6602267d32242439fe8daed8067ff6fba336
17 files changed:
hphp/hack/src/errors/errors.ml
hphp/hack/src/typing/nastCheck.ml
hphp/hack/test/typecheck/__callStatic.php [new file with mode: 0644]
hphp/hack/test/typecheck/__callStatic.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/__clone.php [new file with mode: 0644]
hphp/hack/test/typecheck/__clone.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/__construct.php [new file with mode: 0644]
hphp/hack/test/typecheck/__construct.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/construct/parent_construct8.php
hphp/hack/test/typecheck/magic_methods_parent_call.php [new file with mode: 0644]
hphp/hack/test/typecheck/magic_methods_parent_call.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/magic_methods_parent_call2.php [new file with mode: 0644]
hphp/hack/test/typecheck/magic_methods_parent_call2.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/ppl/parent_construct_in_constructor.php
hphp/hack/test/typecheck/reserved_keywords.php
hphp/hack/test/typecheck/tconst/parent_test.php
hphp/hack/test/typecheck/tconst/parent_test.php.exp