mirror of
https://github.com/golang/go
synced 2024-11-23 06:50:05 -07:00
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 <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com>
This commit is contained in:
parent
8c29881dd1
commit
5612215d32
@ -43,10 +43,9 @@ func checkFiles(noders []*noder) (posMap, *types2.Package, *types2.Info) {
|
|||||||
packages: make(map[string]*types2.Package),
|
packages: make(map[string]*types2.Package),
|
||||||
}
|
}
|
||||||
conf := types2.Config{
|
conf := types2.Config{
|
||||||
Context: ctxt,
|
Context: ctxt,
|
||||||
GoVersion: base.Flag.Lang,
|
GoVersion: base.Flag.Lang,
|
||||||
IgnoreBranchErrors: true, // parser already checked via syntax.CheckBranches mode
|
IgnoreBranchErrors: true, // parser already checked via syntax.CheckBranches mode
|
||||||
CompilerErrorMessages: true, // use error strings matching existing compiler errors
|
|
||||||
Error: func(err error) {
|
Error: func(err error) {
|
||||||
terr := err.(types2.Error)
|
terr := err.(types2.Error)
|
||||||
msg := terr.Msg
|
msg := terr.Msg
|
||||||
|
@ -131,11 +131,6 @@ type Config struct {
|
|||||||
// If IgnoreBranchErrors is set, branch/label errors are ignored.
|
// If IgnoreBranchErrors is set, branch/label errors are ignored.
|
||||||
IgnoreBranchErrors bool
|
IgnoreBranchErrors bool
|
||||||
|
|
||||||
// If CompilerErrorMessages is set, errors are reported using
|
|
||||||
// cmd/compile error strings to match $GOROOT/test errors.
|
|
||||||
// TODO(gri) Consolidate error messages and remove this flag.
|
|
||||||
CompilerErrorMessages bool
|
|
||||||
|
|
||||||
// If go115UsesCgo is set, the type checker expects the
|
// If go115UsesCgo is set, the type checker expects the
|
||||||
// _cgo_gotypes.go file generated by running cmd/cgo to be
|
// _cgo_gotypes.go file generated by running cmd/cgo to be
|
||||||
// provided as a package source file. Qualified identifiers
|
// provided as a package source file. Qualified identifiers
|
||||||
|
@ -18,10 +18,6 @@ import (
|
|||||||
const (
|
const (
|
||||||
debug = false // leave on during development
|
debug = false // leave on during development
|
||||||
trace = false // turn on for detailed type resolution traces
|
trace = false // turn on for detailed type resolution traces
|
||||||
|
|
||||||
// TODO(rfindley): add compiler error message handling from types2, guarded
|
|
||||||
// behind this flag, so that we can keep the code in sync.
|
|
||||||
compilerErrorMessages = false // match compiler error messages
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// exprInfo stores information about an untyped expression.
|
// exprInfo stores information about an untyped expression.
|
||||||
|
Loading…
Reference in New Issue
Block a user