Option to disallow return-by-ref
commitec602cce247f55ee83ba05da47cb5a9c11d3a52a
authorMike Qian <mqian@fb.com>
Mon, 11 Jun 2018 09:22:40 +0000 (11 02:22 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 11 Jun 2018 16:29:49 +0000 (11 09:29 -0700)
treec1171c319fbf032ec19e4bcdc9aa75784557b760
parentddbf33128014891341446dff5abff3d8af3a62cb
Option to disallow return-by-ref

Summary: Returning references is banned if `disallow_return_by_ref = true` is set in .hhconfig.

Reviewed By: kmeht

Differential Revision: D8346577

fbshipit-source-id: 3a87b4f6bff776053c7833e4f0e3bb7ac412785e
22 files changed:
hphp/hack/src/errors/error_codes.ml
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors_sig.ml
hphp/hack/src/hh_single_type_check.ml
hphp/hack/src/options/globalOptions.ml
hphp/hack/src/options/globalOptions.mli
hphp/hack/src/options/typecheckerOptions.ml
hphp/hack/src/parser/parser_hack.ml
hphp/hack/src/server/serverConfig.ml
hphp/hack/src/typing/nastCheck.ml
hphp/hack/test/errors/error_map.ml
hphp/hack/test/integration_ml/ide/test_auto_ns_aliasing.ml
hphp/hack/test/integration_ml/integration_test_base.ml
hphp/hack/test/tast/ret_by_ref.php.exp
hphp/hack/test/typecheck/disallow_return_by_ref/function.php [new file with mode: 0644]
hphp/hack/test/typecheck/disallow_return_by_ref/function.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/disallow_return_by_ref/method.php [new file with mode: 0644]
hphp/hack/test/typecheck/disallow_return_by_ref/method.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/inout/HH_FLAGS [new file with mode: 0644]
hphp/hack/test/typecheck/references/pass_by_ref/HH_FLAGS
hphp/hack/test/typecheck/references/refs_in_array/HH_FLAGS
hphp/hack/test/unit/typing/unify_test.ml