Sema: Revert sema.err to null if the Decl already has an error

Previously we would assign the error message to Sema and then never
clear it even when destroying the error message, which caused memory
corruption.

Closes #12437
a9c4dc84f4sin-ack committed on 8/15/2022, 8:34:12 AM· committed by Veikka Tuominenparent40eac90
1 file changedLine totals unavailable