Recurse into inner expressions before outer ones in readonly check
Summary:
This diff handles two cases of bugs due to assignment order: in foreach, we should assign to the "as" statement on every iteration of the loop.
In general, expressions should be analyzed depth first, in that we should evaluate and update the context of inner expressions before the outer one, as that's the order of evaluation for the runtime.
Having to use `is_typechecker` everywhere is kind of gross, but necessary, and that represents the bulk of this diff.
Reviewed By: oulgen
Differential Revision:
D33030063
fbshipit-source-id:
1d66824940c2e8e7ce28fece2d3c9edfdec88a85