Skip to content

Commit 5612215

Browse files
griesemerRobert Griesemer
authored and
Robert Griesemer
committed
go/types, types2: remove (C/c)ompilerErrorMessages flag - not needed anymore
Fixes #55326. Change-Id: Ic300976ddf504224faadc5bae21736fe94dac6bf Reviewed-on: https://go-review.googlesource.com/c/go/+/435416 Reviewed-by: Robert Findley <[email protected]> Auto-Submit: Robert Griesemer <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Run-TryBot: Robert Griesemer <[email protected]>
1 parent 8c29881 commit 5612215

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

src/cmd/compile/internal/noder/irgen.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ func checkFiles(noders []*noder) (posMap, *types2.Package, *types2.Info) {
4343
packages: make(map[string]*types2.Package),
4444
}
4545
conf := types2.Config{
46-
Context: ctxt,
47-
GoVersion: base.Flag.Lang,
48-
IgnoreBranchErrors: true, // parser already checked via syntax.CheckBranches mode
49-
CompilerErrorMessages: true, // use error strings matching existing compiler errors
46+
Context: ctxt,
47+
GoVersion: base.Flag.Lang,
48+
IgnoreBranchErrors: true, // parser already checked via syntax.CheckBranches mode
5049
Error: func(err error) {
5150
terr := err.(types2.Error)
5251
msg := terr.Msg

src/cmd/compile/internal/types2/api.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ type Config struct {
131131
// If IgnoreBranchErrors is set, branch/label errors are ignored.
132132
IgnoreBranchErrors bool
133133

134-
// If CompilerErrorMessages is set, errors are reported using
135-
// cmd/compile error strings to match $GOROOT/test errors.
136-
// TODO(gri) Consolidate error messages and remove this flag.
137-
CompilerErrorMessages bool
138-
139134
// If go115UsesCgo is set, the type checker expects the
140135
// _cgo_gotypes.go file generated by running cmd/cgo to be
141136
// provided as a package source file. Qualified identifiers

src/go/types/check.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ import (
1818
const (
1919
debug = false // leave on during development
2020
trace = false // turn on for detailed type resolution traces
21-
22-
// TODO(rfindley): add compiler error message handling from types2, guarded
23-
// behind this flag, so that we can keep the code in sync.
24-
compilerErrorMessages = false // match compiler error messages
2521
)
2622

2723
// exprInfo stores information about an untyped expression.

0 commit comments

Comments
 (0)