Replace `fun` and `class_meth` with function pointers in `hh` tests
commit8547c01006314b725cf3b50cc6be9d1c81e6cf31
authorHunter Goldstein <hgoldstein@meta.com>
Tue, 14 Feb 2023 00:34:46 +0000 (13 16:34 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 14 Feb 2023 00:34:46 +0000 (13 16:34 -0800)
tree70c1163013bb697ef01e3988f653319c9dc5d0b3
parentba98b5a9ae035ef224da7a4f5b2cced40a242148
Replace `fun` and `class_meth` with function pointers in `hh` tests

Summary:
`fun`, `class_meth`, and `inst_meth` ought to be properly ripped out of Hack. The steps here are roughly:
1. Codemod away the syntax from tests (we are here)
2. Default the options for disabling these at the parser level to `on`
3. Rip out the typechecker & compiler support
4. Relax the parser rules in (2)

This diff takes a stab at the "trivial" `class_meth` and `fun` in typechecker tests.  My general rule here was to let the codemod do its thing if the automated change looked like it was testing *roughly* the same thing.  There are some tests that look a bit weird now.

Reviewed By: andrewjkennedy

Differential Revision: D42255400

fbshipit-source-id: 5ded99ff50f358635e35fa8c88ee37dd47dcb35c
94 files changed:
hphp/hack/test/typecheck/argument_unpacking/unpack_call1.php
hphp/hack/test/typecheck/class_meth1.php
hphp/hack/test/typecheck/class_meth11.php
hphp/hack/test/typecheck/class_meth11.php.exp
hphp/hack/test/typecheck/class_meth13.php
hphp/hack/test/typecheck/class_meth13.php.exp
hphp/hack/test/typecheck/class_meth14.php
hphp/hack/test/typecheck/class_meth14.php.exp
hphp/hack/test/typecheck/class_meth15.php
hphp/hack/test/typecheck/class_meth15.php.exp
hphp/hack/test/typecheck/class_meth2.php
hphp/hack/test/typecheck/class_meth2.php.exp
hphp/hack/test/typecheck/class_meth3.php
hphp/hack/test/typecheck/class_meth4.php
hphp/hack/test/typecheck/class_meth4.php.exp
hphp/hack/test/typecheck/class_meth5.php
hphp/hack/test/typecheck/class_meth6.php
hphp/hack/test/typecheck/class_meth6.php.exp
hphp/hack/test/typecheck/class_meth7.php
hphp/hack/test/typecheck/class_meth7.php.exp
hphp/hack/test/typecheck/class_meth8.php
hphp/hack/test/typecheck/class_meth8.php.exp
hphp/hack/test/typecheck/class_meth_generics.php
hphp/hack/test/typecheck/class_meth_no_typedef.php
hphp/hack/test/typecheck/class_meth_no_typedef.php.exp
hphp/hack/test/typecheck/coeffects/higher_order_function.php
hphp/hack/test/typecheck/constraints/class_meth_generics_bad.php
hphp/hack/test/typecheck/constraints/classmeth_constraints.php
hphp/hack/test/typecheck/constraints/classmeth_constraints_bad.php
hphp/hack/test/typecheck/deprecated_class_meth.php
hphp/hack/test/typecheck/deprecated_class_meth.php.exp
hphp/hack/test/typecheck/fun_generics_bad.php
hphp/hack/test/typecheck/func_ptr_in_constants/allowed_func_ptr_builtins.php
hphp/hack/test/typecheck/func_ptr_in_constants/disallowed/allowed_func_ptr_builtins.php
hphp/hack/test/typecheck/func_ptr_in_constants/disallowed/allowed_func_ptr_builtins.php.exp
hphp/hack/test/typecheck/function_hint_with_variadic_parameter.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_and_arg_with_vararg.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_and_non_variadic_arg.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_and_non_variadic_arg.php.exp
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_contravariant.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_not_covariant_1.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_not_covariant_1.php.exp
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_not_covariant_2.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_not_covariant_2.php.exp
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_return_type.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_return_type.php.exp
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_type.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_type.php.exp
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_types.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_types.php.exp
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_variadic_type.php
hphp/hack/test/typecheck/function_hint_with_variadic_parameter_wrong_variadic_type.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_abstract.php
hphp/hack/test/typecheck/function_pointer/class_meth_abstract.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_abstract_static.php
hphp/hack/test/typecheck/function_pointer/class_meth_abstract_static2.php
hphp/hack/test/typecheck/function_pointer/class_meth_abstract_trait.php
hphp/hack/test/typecheck/function_pointer/class_meth_abstract_trait.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_abstract_trait2.php
hphp/hack/test/typecheck/function_pointer/class_meth_final__CLASS__.php
hphp/hack/test/typecheck/function_pointer/class_meth_interface.php
hphp/hack/test/typecheck/function_pointer/class_meth_interface.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_interface_inherited.php
hphp/hack/test/typecheck/function_pointer/class_meth_interface_inherited.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_reified.php
hphp/hack/test/typecheck/function_pointer/class_meth_reified.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_reified_self.php
hphp/hack/test/typecheck/function_pointer/class_meth_reified_self.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_reified_static.php
hphp/hack/test/typecheck/function_pointer/class_meth_reified_static.php.exp
hphp/hack/test/typecheck/function_pointer/class_meth_reified_trait.php
hphp/hack/test/typecheck/function_pointer/class_meth_reified_trait.php.exp
hphp/hack/test/typecheck/function_pointer/reified_fun.php
hphp/hack/test/typecheck/function_pointer/reified_fun.php.exp
hphp/hack/test/typecheck/gen8.php
hphp/hack/test/typecheck/gen9.php
hphp/hack/test/typecheck/generic_fun.php
hphp/hack/test/typecheck/generic_fun_2.php
hphp/hack/test/typecheck/generic_fun_3.php
hphp/hack/test/typecheck/inout/inout_hint1.php
hphp/hack/test/typecheck/like_types/dynamic_coercion/fun_id.php
hphp/hack/test/typecheck/like_types/dynamic_coercion/smethod_id.php
hphp/hack/test/typecheck/nonnull/function_is_subtype_of_nonnull.php
hphp/hack/test/typecheck/tconst/func_pointer.php
hphp/hack/test/typecheck/tconst/tconst_bug.php
hphp/hack/test/typecheck/tconst/tconst_bug.php.exp
hphp/hack/test/typecheck/typehole/T92053733.php
hphp/hack/test/typecheck/typing_function1.php
hphp/hack/test/typecheck/unbound_name/fun_id.php
hphp/hack/test/typecheck/unbound_name/fun_id.php.exp
hphp/hack/test/typecheck/unbound_name/smethod_id.php
hphp/hack/test/typecheck/unbound_name/smethod_id.php.exp
hphp/hack/test/typecheck/union/union_functions2.php
hphp/hack/test/typecheck/using/using_bad_return_disposable.php