aboutsummaryrefslogtreecommitdiff
path: root/src/errors/example_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2023-08-14 15:56:08 -0700
committerGopher Robot <gobot@golang.org>2023-08-15 21:01:03 +0000
commitf2f5979253717ce939d75f57c9f8be3de849a875 (patch)
tree7415d177add40db85b9524eaaf5120eb2f689358 /src/errors/example_test.go
parent3be2176d92ad318b9085980b0b7f09f30541afb3 (diff)
downloadgo-f2f5979253717ce939d75f57c9f8be3de849a875.tar.xz
go/types, types2: use correct parameter list when checking argument passing
The existing code was simply wrong: we cannot ever use the result signature parameter list (rsig.params) if sigParams was adjusted for variadic functions. If it was adjusted, we always must either use sigParams or its separately instantiated version. In the condition "n > 0 && adjusted", the "n > 0" should have been in either of the respective "if statement" branches. Simplified the code by merging with the result signature parameter update. Fixes #61931. Change-Id: I5d39bc8bbc4dd85c7c985055d29532b4b176955e Reviewed-on: https://go-review.googlesource.com/c/go/+/519456 Auto-Submit: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/errors/example_test.go')
0 files changed, 0 insertions, 0 deletions