parser ban by-ref on construct calls and definition
commit9ba103538347b133f11cda5dc06d4fb19414396e
authorBill Fumerola <bill@fb.com>
Tue, 2 Jul 2019 20:50:24 +0000 (2 13:50 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 2 Jul 2019 20:54:43 +0000 (2 13:54 -0700)
treefbd16d30168b23e94d9d23b84ceeaa8cf5894605
parentdc9f79a3e1dce83828a6a56f340ddfff655d6932
parser ban by-ref on construct calls and definition

Summary:
parse errors on both:
```
class X {
  public function __construct(&$x) {}
}
```
```
function main() {
  $x = null;
  new X(&$x);
}
```

Reviewed By: periodic1236, alexeyt

Differential Revision: D15348579

fbshipit-source-id: a0a63073584d50c175fab6eb8198b6a10548bdc5
12 files changed:
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors.mli
hphp/hack/src/parser/full_fidelity_parser_errors.ml
hphp/hack/src/parser/full_fidelity_syntax_error.ml
hphp/hack/src/parser/full_fidelity_syntax_error.mli
hphp/hack/src/typing/nast_check/inout_check.ml
hphp/hack/test/full_fidelity/cases/inout_in_new.php.errors.exp
hphp/hack/test/typecheck/references/byref_on_construct.php.exp
hphp/test/slow/new_object_expression/779.php [deleted file]
hphp/test/slow/new_object_expression/779.php.expect [deleted file]
hphp/test/zend/good/ext/reflection/tests/parameters_002.php
hphp/test/zend/good/ext/reflection/tests/parameters_002.php.expectf