]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: suppress typecheck errors in a type switch case with broken type
authorGergely Brautigam <skarlso777@gmail.com>
Fri, 18 Jan 2019 20:43:56 +0000 (21:43 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 27 Feb 2019 08:22:03 +0000 (08:22 +0000)
commit8ee9bca2729ead81da6bf5a18b87767ff396d1b7
tree665d0f664ec2d72e5530528798bf8dc05f617de6
parent9cb2471334e75c5e8f459e820feb75da315563a7
cmd/compile: suppress typecheck errors in a type switch case with broken type

If a type switch case expression has failed typechecking, the case body is
likely to also fail with confusing or spurious errors. Suppress
typechecking the case body when this happens.

Fixes #28926

Change-Id: Idfdb9d5627994f2fd90154af1659e9a92bf692c4
Reviewed-on: https://go-review.googlesource.com/c/158617
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/swt.go
test/fixedbugs/issue28926.go [new file with mode: 0644]