[go] spec: remove restriction on channel element types for close built-in (bug fix)

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 2, 2025, 6:07:24 PM (2 days ago) Dec 2
to Robert Griesemer, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Robert Findley, Alan Donovan, Ian Lance Taylor, Keith Randall, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
spec: remove restriction on channel element types for close built-in (bug fix)

The spec states that if the argument type for close is a type parameter,
it's type set must only contain channels and they must all have the same
element type. This latter requirement (all must have the same element
type) was never enforced by the compiler, nor is it important for
correctness or required by the implementation.

This change removes this requirement also in the spec and thus
documents what was always (since 1.18) the case.

Fixes #74034.
Change-Id: If65d50bfb581b7f37999413088d3d3b1820e054a
Reviewed-by: Robert Griesemer <g...@google.com>
Auto-Submit: Robert Griesemer <g...@google.com>
Reviewed-by: Robert Findley <rfin...@google.com>
Files:
  • M doc/go_spec.html
Change size: XS
Delta: 1 file changed, 1 insertion(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Robert Findley, +1 by Robert Griesemer
  • 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: If65d50bfb581b7f37999413088d3d3b1820e054a
Gerrit-Change-Number: 725923
Gerrit-PatchSet: 2
Gerrit-Owner: Robert Griesemer <g...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Robert Findley <rfin...@google.com>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-CC: Keith Randall <k...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages