mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/syntax: accept "~" and "|" interface elements
Type lists continue to be accepted as before. While at it, print missing filenames in error tests (which uses an ad-hoc position representation). Change-Id: I933b3acbc9cf1985ad8f70f6b206e3a1dbd64d1e Reviewed-on: https://go-review.googlesource.com/c/go/+/307371 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
1129a60f1c
commit
4638545d85
4 changed files with 126 additions and 17 deletions
|
|
@ -164,7 +164,7 @@ func testSyntaxErrors(t *testing.T, filename string) {
|
|||
// we have a match - eliminate this error
|
||||
delete(declared, pos)
|
||||
} else {
|
||||
t.Errorf("%s: unexpected error: %s", orig, e.Msg)
|
||||
t.Errorf("%s:%s: unexpected error: %s", filename, orig, e.Msg)
|
||||
}
|
||||
}, nil, mode)
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ func testSyntaxErrors(t *testing.T, filename string) {
|
|||
|
||||
// report expected but not reported errors
|
||||
for pos, pattern := range declared {
|
||||
t.Errorf("%s: missing error: %s", pos, pattern)
|
||||
t.Errorf("%s:%s: missing error: %s", filename, pos, pattern)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue