Indiscriminately replace function type parameters with int
commite87cb2bb469b588ee011bb49fb4c615b26c2d2a1
authorMistral Orhan Jean-Pierre Contrastin <mojpc2@fb.com>
Tue, 16 Aug 2022 12:20:59 +0000 (16 05:20 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 16 Aug 2022 12:20:59 +0000 (16 05:20 -0700)
treeb5c6298c7f2cff32416d33ad26b90839d7cd89f0
parentc51d6751d8f72321344790a418f6e01511963b95
Indiscriminately replace function type parameters with int

Summary:
Simplest version of substitution mutation where we replace every type parameter usage with `int` and remove the said type parameters. It only applies to functions.

This is incomplete for various reasons. For example, it doesn't take bounds into account. It also only converts type parameter hint occurrences shallowly.

Reviewed By: vassilmladenov

Differential Revision: D38183040

fbshipit-source-id: e938dd52e16eb18bfa0796228d47183ed35ec74c
hphp/hack/src/naming/dune
hphp/hack/src/naming/naming.ml
hphp/hack/src/substitution_mutation/dune
hphp/hack/src/substitution_mutation/substitution_mutation.ml
hphp/hack/src/typing/typing_check_job.ml
hphp/hack/test/substitution_mutation/dune [new file with mode: 0644]
hphp/hack/test/substitution_mutation/function1.php [new file with mode: 0644]
hphp/hack/test/substitution_mutation/function1.php.exp [new file with mode: 0644]