fix assignment in conjunction of conditionals
commita4f94a76bd34dea92dccfccdf92e6b14a6a2f5bb
authorCatherine Gasnier <catg@fb.com>
Fri, 12 Oct 2018 20:55:26 +0000 (12 13:55 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 12 Oct 2018 20:58:04 +0000 (12 13:58 -0700)
tree858c973f8d95b9e0f12e8157cbe630606b16f67b
parenta325e3df1ebd3d57174fea2f40751b9a75cf387c
fix assignment in conjunction of conditionals

Summary:
Assignments in RHS of `&&` and `||` in conditions was broken, e.g.
```
if ($b && ($x = 1) !== 0) {
```
See added test for more about what was broken.

Reviewed By: Wilfred

Differential Revision: D9934261

fbshipit-source-id: 88006203ea692845b25167516cc10d5c7c0b9c86
hphp/hack/src/typing/typing.ml
hphp/hack/test/typecheck/assignment_sequencing/assign_in_conj_disj_of_conditionals.php [new file with mode: 0644]
hphp/hack/test/typecheck/assignment_sequencing/assign_in_conj_disj_of_conditionals.php.exp [new file with mode: 0644]