Please sign in to comment.
SI-7345 Prefer using a throwaway silent context over buffer flushing.
When we are using a throwaway silent context, we can just let it drift out of scope and over the horizon, rather than ceremoniously flushing its buffers on completion. - Applied to Scaladoc. - Applied to Infer#isApplicableSafe. Less manual error buffer management affords greater opportunity to cleanly express the logic. - Applied to `typerReportAnyContextErrors`. The reasoning for the last case is as follows: - There were only two callers to `typerReportAnyContextErrors`, and they both passed in as `c` a child context of `context`. - That child context must share the error reporting mode and buffer with `context`. - Therefore, extracting an error from `c` and issuing it into `context` is a no-op. Because the error buffer is Set, it was harmless. This part will probably textually conflict with the same change made in SI-7319, but the end results are identical.
- Loading branch information...
Showing with 44 additions and 56 deletions.