Commits

gregomni committed da93f6cc6d6
Stop emitting most duplicated only-as-generic-constraint errors. Set type repr's as invalid after diagnosing an unsupported protocol to stop duplicate diagnoses. There were two causes here. First, top-level variable declarations were being checked once by the Decl checker, and then again by the Stmt checker. (This caused SR-38.) Second, the Stmt checker is called by an AST visitor itself, which already calls it once per statement. Using the UnsupportedProtocolVisitor here meant that each interior sub statement would get visited multiple times. Added a setRecurseIntoSubstatements() on the visitor, and set it to false for the Stmt checker. This keeps from revisiting statements multiple times.