I think env should be preserved out of do_naming
Summary:
Error streaming was introduced in
D29454477 (https://github.com/facebook/hhvm/commit/
6805e3fbe5e5ced2cd3ecbf1ab49418839d81f7f). A comment on that diff says:
> This is to mirror the signature of do_naming, do_typing, do_decling and so on. These never access env.errorl. env.errorl is read at the beginning of the outer function, is threaded through do_parsing, do_naming, do_typing, etc., then is put back into env.errorl.
But looking at the code, I think that env is in fact NOT being threading out of do_naming. The result would be that env isn't aware we've already pushed out some "duplicate name" errors.
Reviewed By: CatherineGasnier
Differential Revision:
D30882983
fbshipit-source-id:
fc1acf88dc21ab48730100db25fba6da0e13089e