]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use more specific error message for assignment mismatch
authorDavid Heuschmann <heuschmann.d@gmail.com>
Sat, 15 Sep 2018 11:04:59 +0000 (13:04 +0200)
committerRobert Griesemer <gri@golang.org>
Thu, 27 Sep 2018 00:35:06 +0000 (00:35 +0000)
commitae9c822f78d5048aa4290b06a5a38f67aaf23dbe
tree4814b8a93683a03a1bd51cc0587694bca60f5cc7
parent10aeb672e0183b63b6e2d59e49c38c8e83ea6113
cmd/compile: use more specific error message for assignment mismatch

Show a more specifc error message in the form of "%d variables but %v
returns %d values" if an assignment mismatch occurs with a function
or method call on the right.

Fixes #27595

Change-Id: Ibc97d070662b08f150ac22d686059cf224e012ab
Reviewed-on: https://go-review.googlesource.com/135575
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/typecheck.go
test/fixedbugs/issue26616.go
test/fixedbugs/issue27595.go [new file with mode: 0644]