mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/syntax: assume generic code for std lib
Also: improve some error message prints in testSyntaxErrors. Change-Id: Iaa1d642398fa82975fefb4bde54f476dd5229eb5 Reviewed-on: https://go-review.googlesource.com/c/go/+/351791 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
483533df9e
commit
aa878ee49b
2 changed files with 4 additions and 7 deletions
|
|
@ -154,11 +154,11 @@ func testSyntaxErrors(t *testing.T, filename string) {
|
|||
if found {
|
||||
rx, err := regexp.Compile(pattern)
|
||||
if err != nil {
|
||||
t.Errorf("%s: %v", pos, err)
|
||||
t.Errorf("%s:%s: %v", filename, pos, err)
|
||||
return
|
||||
}
|
||||
if match := rx.MatchString(e.Msg); !match {
|
||||
t.Errorf("%s: %q does not match %q", pos, e.Msg, pattern)
|
||||
t.Errorf("%s:%s: %q does not match %q", filename, pos, e.Msg, pattern)
|
||||
return
|
||||
}
|
||||
// we have a match - eliminate this error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue