Emit fatal when unit takes a reference to an element in $GLOBALS
commit00a558e262ca65d7ef4a5c5dbd990c4db4b8ee52
authorBill Fumerola <bill@fb.com>
Mon, 25 Mar 2019 19:16:51 +0000 (25 12:16 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 25 Mar 2019 19:23:49 +0000 (25 12:23 -0700)
treeb19abf0cce176d91b1a7ddfd0f339e625665aaf5
parentc60cedd7941f801aa2282324f844de9760ebcd0a
Emit fatal when unit takes a reference to an element in $GLOBALS

Summary:
this behavior was announced in https://hhvm.com/blog/2019/02/11/hhvm-4.0.0.html ("Binding references to array elements", "references to superglobals")

the typechecker already has rules against both references to elements (typing check) and to superglobals (naming check)

Reviewed By: kmeht, alexeyt

Differential Revision: D14218899

fbshipit-source-id: 10628a8568ed371dc7ab869687bf24c989e66ad2
hphp/hack/src/hhbc/emit_expression.ml
hphp/test/quick/GByRef.php
hphp/test/slow/rx/body/ref-non-local.php
hphp/test/slow/rx/body/ref-non-local.php.expectf