Deprecate `call_user_func`
commit1ae01380e1077bcafa7a80d67118a7aacb3a5eb2
authorHrutvik Kanabar <hrutvik@fb.com>
Wed, 9 Sep 2020 14:45:31 +0000 (9 07:45 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 9 Sep 2020 14:47:32 +0000 (9 07:47 -0700)
tree7cb035cfa84f0179db88c926dc1e5f7e8521357b
parent7debe93208df70a62dbdc0125dda254a1b7a097b
Deprecate `call_user_func`

Summary:
Throw an error during naming to highlight that `call_user_func` is deprecated.

Remove the enumeration `Aast.call_type` entirely - this expresses only the difference between a "normal" call (`Cnormal`) and a `call_user_func` call (`Cuser_func`). After deprecating `call_user_func`, there isn't any need for this distinction.

Reviewed By: Wilfred

Differential Revision: D23371368

fbshipit-source-id: 21a41d461f18909db8736588ae38ee4000609546
104 files changed:
hphp/hack/hhi/stdlib/builtins_function.hhi
hphp/hack/src/annotated_ast/aast.ml
hphp/hack/src/annotated_ast/aast_defs.ml
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors.mli
hphp/hack/src/hhbc/ast_constant_folder.rs
hphp/hack/src/hhbc/closure_convert.rs
hphp/hack/src/hhbc/decl_vars.rs
hphp/hack/src/hhbc/emit_expression.rs
hphp/hack/src/hhbc/emit_pu.rs
hphp/hack/src/hhbc/emit_statement.rs
hphp/hack/src/hhbc/emit_xhp.rs
hphp/hack/src/hhbc/print.rs
hphp/hack/src/ifc/ifc.ml
hphp/hack/src/naming/elaborate_namespaces_visitor.rs
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/naming_elaborate_namespaces_endo.ml
hphp/hack/src/naming/nast.ml
hphp/hack/src/oxidized/aast_visitor/node_impl_gen.rs
hphp/hack/src/oxidized/aast_visitor/node_mut_impl_gen.rs
hphp/hack/src/oxidized/aast_visitor/visitor.rs
hphp/hack/src/oxidized/aast_visitor/visitor_mut.rs
hphp/hack/src/oxidized/gen/aast.rs
hphp/hack/src/oxidized/gen/aast_defs.rs
hphp/hack/src/oxidized/impl_gen/aast_defs_impl_gen.rs
hphp/hack/src/oxidized/impl_gen/aast_impl_gen.rs
hphp/hack/src/oxidized_by_ref/gen/aast.rs
hphp/hack/src/oxidized_by_ref/gen/aast_defs.rs
hphp/hack/src/parser/aast_check.rs
hphp/hack/src/parser/expression_tree_check.rs
hphp/hack/src/parser/lowerer/lowerer.rs
hphp/hack/src/server/identifySymbolService.ml
hphp/hack/src/server/serverFunDepsBatch.ml
hphp/hack/src/server/symbolFunCallService.ml
hphp/hack/src/typing/nastInitCheck.ml
hphp/hack/src/typing/nast_check/nast_reactivity_check.ml
hphp/hack/src/typing/nast_check/unbound_name_check.ml
hphp/hack/src/typing/nast_visitor.ml
hphp/hack/src/typing/tast_check/basic_reactivity_check.ml
hphp/hack/src/typing/tast_check/const_write_check.ml
hphp/hack/src/typing/tast_check/pseudofunctions_check.ml
hphp/hack/src/typing/tast_check/reified_check.ml
hphp/hack/src/typing/tast_check/shape_field_check.ml
hphp/hack/src/typing/tast_typecheck.ml
hphp/hack/src/typing/tast_visitor.ml
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_func_terminality.ml
hphp/hack/src/typing/typing_mutability.ml
hphp/hack/src/typing/typing_visibility.ml
hphp/hack/test/nast/top_level.php.exp
hphp/hack/test/tast/add_vector.php.exp
hphp/hack/test/tast/array_filter.php.exp
hphp/hack/test/tast/array_map.php.exp
hphp/hack/test/tast/array_order.php.exp
hphp/hack/test/tast/async_lambda.php.exp
hphp/hack/test/tast/awaitall.php.exp
hphp/hack/test/tast/call_args.php.exp
hphp/hack/test/tast/concurrent_error.php.exp
hphp/hack/test/tast/contravariant_solve.php.exp
hphp/hack/test/tast/control_flow/loop_cond.php.exp
hphp/hack/test/tast/finally.php.exp
hphp/hack/test/tast/fun_meth_variadic.php.exp
hphp/hack/test/tast/global_inference/call_chain.php.exp
hphp/hack/test/tast/global_inference/call_chain_evil.php.exp
hphp/hack/test/tast/global_inference/call_chain_evil2.php.exp
hphp/hack/test/tast/global_inference/call_chain_evil_evil.php.exp
hphp/hack/test/tast/global_inference/call_chain_evil_evil1.php.exp
hphp/hack/test/tast/global_inference/call_chain_evil_evil1_static.php.exp
hphp/hack/test/tast/global_inference/fun_composed.php.exp
hphp/hack/test/tast/global_inference/fun_composed_small.php.exp
hphp/hack/test/tast/global_inference/id_composed.php.exp
hphp/hack/test/tast/global_inference/mymap.php.exp
hphp/hack/test/tast/global_inference/params/type_hint_inferred_parameters_constructor.php.exp
hphp/hack/test/tast/global_inference/params/type_hint_parameter_call.php.exp
hphp/hack/test/tast/global_inference/params/type_hint_parameter_call_method.php.exp
hphp/hack/test/tast/global_inference/params/type_hint_parameter_survive_assignment.php.exp
hphp/hack/test/tast/global_inference/partial_annot.php.exp
hphp/hack/test/tast/global_inference/partial_annot_where.php.exp
hphp/hack/test/tast/global_inference/properties/type_hint_inferred_property_constructor.php.exp
hphp/hack/test/tast/global_inference/properties/type_hint_inferred_property_getter.php.exp
hphp/hack/test/tast/global_inference/reinfer_types/call_chain_evil.php.exp
hphp/hack/test/tast/lambda1.php.exp
hphp/hack/test/tast/lambda_contextual.php.exp
hphp/hack/test/tast/lambda_efun.php.exp
hphp/hack/test/tast/mixed_mixed.php.exp
hphp/hack/test/tast/multiple_type.php.exp
hphp/hack/test/tast/parent_construct.php.exp
hphp/hack/test/tast/parent_method.php.exp
hphp/hack/test/tast/pseudofunctions.php.exp
hphp/hack/test/tast/re_prefixed_string/re_prefixed_string.php.exp
hphp/hack/test/tast/reify_mix_with_erased.php.exp
hphp/hack/test/tast/shapes_special_functions.php.exp
hphp/hack/test/tast/singleton_unresolved_function_call.php.exp
hphp/hack/test/tast/switch_fallthrough.php.exp
hphp/hack/test/tast/try_catch.php.exp
hphp/hack/test/tast/unbound_func.php.exp
hphp/hack/test/tast/unresolved_grown_after_lambda.php.exp
hphp/hack/test/typecheck/call_user_func_array.php.exp
hphp/hack/test/typecheck/call_user_func_method.php.exp
hphp/hack/test/typecheck/functional_anon_fun.php.exp
hphp/hack/test/typecheck/functional_anon_fun2.php.exp
hphp/hack/test/typecheck/functional_higher_order.php.exp
hphp/hack/test/typecheck/typing_function1.php.exp
hphp/hack/test/typecheck/typing_function2.php.exp