diff options
author | Zachary Burkett <zburkett@splitcubestudios.com> | 2021-05-29 19:54:10 +0000 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-06-02 05:14:45 +0000 |
commit | d2b435117d3a1db612ad894125b8ab673a5a46ee (patch) | |
tree | ef64315d120a6016a92d84ee70dbf32c90bd94ba /test/complit1.go | |
parent | b1f48e8addb640b6cbfad56d790b7702ff9fd30d (diff) | |
download | go-git-d2b435117d3a1db612ad894125b8ab673a5a46ee.tar.gz |
test: fix error check messages for 2 types2 tests
Many compiler tests fail with -G=3 due to changes in error message format.
This commit fixes two of these tests, to ensure I am on the right track in review.
Updates #46447
Change-Id: I138956d536a1d48ca9198e6ddbfde13865bb5dd5
GitHub-Last-Rev: 0ed904b9fad5e6739fee02ab48c7bc66508d736b
GitHub-Pull-Request: golang/go#46445
Reviewed-on: https://go-review.googlesource.com/c/go/+/323314
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'test/complit1.go')
-rw-r--r-- | test/complit1.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/complit1.go b/test/complit1.go index 7c2a4e2996..8cbcd63ee0 100644 --- a/test/complit1.go +++ b/test/complit1.go @@ -46,20 +46,20 @@ var ( _ = &T{0, 0, "", nil} // ok _ = &T{i: 0, f: 0, s: "", next: {}} // ERROR "missing type in composite literal|omit types within composite literal" _ = &T{0, 0, "", {}} // ERROR "missing type in composite literal|omit types within composite literal" - _ = TP{i: 0, f: 0, s: "", next: {}} // ERROR "invalid composite literal type TP|omit types within composite literal" + _ = TP{i: 0, f: 0, s: ""} // ERROR "invalid composite literal type TP" _ = &Ti{} // ERROR "invalid composite literal type Ti|expected.*type for composite literal" ) type M map[T]T var ( - _ = M{{i:1}: {i:2}} - _ = M{T{i:1}: {i:2}} - _ = M{{i:1}: T{i:2}} - _ = M{T{i:1}: T{i:2}} + _ = M{{i: 1}: {i: 2}} + _ = M{T{i: 1}: {i: 2}} + _ = M{{i: 1}: T{i: 2}} + _ = M{T{i: 1}: T{i: 2}} ) -type S struct { s [1]*M1 } +type S struct{ s [1]*M1 } type M1 map[S]int -var _ = M1{{s:[1]*M1{&M1{{}:1}}}:2} +var _ = M1{{s: [1]*M1{&M1{{}: 1}}}: 2} |