[go] cmd/compile: preserve variadic signature on range-over-func

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
4:06 PM (7 hours ago) 4:06 PM
to Cuong Manh Le, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, David Chase, Jakub Ciolek, Go LUCI, Keith Randall, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
cmd/compile: preserve variadic signature on range-over-func

When rewriting range-over-func loops, copy the variadic bit from the
original function type into the synthesized body closure's type info.
This keeps the generated closure signature aligned with the source
function and avoids losing variadic-ness during rewrite.

Fixes #78314
Change-Id: I4b5f4628e8c8c14d4ff89dd6b996837264c5cb61
Reviewed-by: Jakub Ciolek <ja...@ciolek.dev>
Auto-Submit: Cuong Manh Le <cuong.m...@gmail.com>
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M src/cmd/compile/internal/rangefunc/rewrite.go
  • A test/fixedbugs/issue78314.go
Change size: S
Delta: 2 files changed, 15 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Jakub Ciolek, +2 by David Chase, +1 by Dmitri Shuralyov
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b5f4628e8c8c14d4ff89dd6b996837264c5cb61
Gerrit-Change-Number: 758041
Gerrit-PatchSet: 2
Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Jakub Ciolek <ja...@ciolek.dev>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages