Commit bdc4ffe9 authored by Robert Griesemer's avatar Robert Griesemer
Browse files

[dev.typeparams] cmd/compile/internal/types2: add Config.IgnoreBranches flag

If the new Config.IgnoreBranches flag is set, the typechecker
ignores errors due to misplaced labels, break, continue,
fallthrough, or goto statements.

Since the syntax parser already checks these errors, we need
to disable a 2nd check by the typechecker to avoid duplicate
errors when running the compiler with the new typechecker.

Adjusted test/run.go to not ignore some of the tests that
used to fail because of duplicate errors.

Change-Id: I8756eb1d44f67afef5e57da289cd604b8e1716db
Reviewed-on: https://go-review.googlesource.com/c/go/+/274612


Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
parent 72ad2f44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment