cmd/compile: terminate compilation if type-checking fails
cmd/compile: terminate compilation if type-checking fails

There is no benefit in continuing compilation if there
are type-checking errors. This will increase robustness
of the compiler in the presence of errors.

Fixes #22909.

Change-Id: I1c70c667e5927646ba3d0f370e33705165620f12
Reviewed-on: https://go-review.googlesource.com/116335
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

cloudflare/go,cloudflare/go,nawawi/go,josharian/go,akutz/go,nawawi/go,akutz/go,akutz/go,golang/go,cloudflare/go,cloudflare/go,nawawi/go,golang/go,CAFxX/go,golang/go,josharian/go,cloudflare/go,cloudflare/go,akutz/go,cloudflare/go,josharian/go,golang/go,CAFxX/go,nawawi/go,josharian/go,nawawi/go,nawawi/go,CAFxX/go,josharian/go,golang/go,CAFxX/go,akutz/go,cloudflare/go,CAFxX/go,josharian/go,golang/go,josharian/go,akutz/go,nawawi/go,nawawi/go,akutz/go,CAFxX/go,akutz/go,CAFxX/go,golang/go,josharian/go,golang/go,CAFxX/go