Move inout check to nast_check
Summary:
Moves check of inout expression to nast_check.
The nast_check visitor appears to traverse a different tree than nastCheck.
This is evidenced by $this and $$ appearing in the tree traversed by nast_check, and not appearing in the tree traversed by nastCheck.
A pattern was added to test for these cases. The tests for these cases are:
- $this : test/typecheck/inout/bad_inout_use_this.php
- $$ : test/typecheck/inout/bad_inout_use_pipe_var.php
Finally, in test case bad_inout_use_arg11.php, the errors thrown were reordered. When testing with a higher number of maximum errors, the previous expected error was thrown after.
Reviewed By: kmeht
Differential Revision:
D15864177
fbshipit-source-id:
993beabb96e6dcf06f801cbdddcf76508ff2cc0c