diff options
author | Matthew Dempsky <mdempsky@google.com> | 2016-10-28 14:22:13 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2016-10-28 21:53:07 +0000 |
commit | ec5b6406b76462a1a97ce19f86c5c23ac1d2c830 (patch) | |
tree | 6b063e530cd400634e5f67e25375a18a012f88c1 /test/ddd1.go | |
parent | 1bd39e79dbc146ae953284f82febf7d1fb461f4e (diff) | |
download | go-ec5b6406b76462a1a97ce19f86c5c23ac1d2c830.tar.gz go-ec5b6406b76462a1a97ce19f86c5c23ac1d2c830.zip |
cmd/compile: improve not enough / too many arguments errors
Use "have" and "want" and multiple lines like other similar error
messages. Also, fix handling of ... and multi-value function calls.
Fixes #17650.
Change-Id: I4850e79c080eac8df3b92a4accf9e470dff63c9a
Reviewed-on: https://go-review.googlesource.com/32261
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'test/ddd1.go')
-rw-r--r-- | test/ddd1.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ddd1.go b/test/ddd1.go index 7ea04f31c3..cf6a3a5873 100644 --- a/test/ddd1.go +++ b/test/ddd1.go @@ -27,9 +27,9 @@ func tuple() (int, int, int) { return 1, 2, 3 } var ( _ = sum(tuple()) - _ = sum(tuple()...) // ERROR "multiple-value|[.][.][.]" + _ = sum(tuple()...) // ERROR "multiple-value" _ = sum3(tuple()) - _ = sum3(tuple()...) // ERROR "multiple-value|[.][.][.]" "not enough" + _ = sum3(tuple()...) // ERROR "multiple-value" "not enough" ) type T []T @@ -59,4 +59,3 @@ func bad(args ...int) { _ = [...]byte("foo") // ERROR "[.][.][.]" _ = [...][...]int{{1,2,3},{4,5,6}} // ERROR "[.][.][.]" } - |