]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile/internal/types2: adjust errors in branch checking code...
authorRobert Griesemer <gri@golang.org>
Fri, 22 Jan 2021 04:20:22 +0000 (20:20 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 22 Jan 2021 06:02:32 +0000 (06:02 +0000)
commitf8654579cdd637167bb38d38f0de76abc812d34c
treec8e390719f9f6b1dc132a0aa1fc468b509bf09c7
parent18bd7aa62581f313c86164d763b1e246307888a9
[dev.typeparams] cmd/compile/internal/types2: adjust errors in branch checking code, fix a bug

The types2.Config.IgnoreBranches flag mistakenly excluded a
set of label-unrelated branch checks. After fixing this and
also adjusting some error messages to match the existing
compiler errors, more errorcheck tests pass now with the -G
option.

Renamed IngnoreBranches to IgnoreLabels since its controlling
label checks, not all branch statement (such as continue, etc)
checks.

Change-Id: I0819f56eb132ce76c9a9628d8942af756691065a
Reviewed-on: https://go-review.googlesource.com/c/go/+/285652
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/noder/irgen.go
src/cmd/compile/internal/types2/api.go
src/cmd/compile/internal/types2/stmt.go
test/run.go