]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: cleanup type switch typechecking
authorMatthew Dempsky <mdempsky@google.com>
Mon, 16 Nov 2020 16:44:40 +0000 (08:44 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 24 Nov 2020 19:32:42 +0000 (19:32 +0000)
commit668e3a598f56d2c9618d800a163f3e784ba3ae0b
treecc436f88a3ace808342408aa57dabfd75e2e36b3
parent96f3fb7244680fbb04549914384ced7afe433daf
[dev.regabi] cmd/compile: cleanup type switch typechecking

Address outstanding TODO, which simplifies subsequent CLs.

Now the compiler always type checks type-switch case clauses (like
gccgo), but it treats clause variables as broken if an appropriate
type cannot be determined for it (like go/types).

Passes toolstash-check.

Change-Id: Iedfe9cdf38c6865211e4b93391f1cf72c1bed136
Reviewed-on: https://go-review.googlesource.com/c/go/+/272648
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/swt.go
test/fixedbugs/bug340.go