[website] _content/doc/go1.26: document removal of cycle restriction for type parameters

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jan 20, 2026, 3:13:01 PM (2 days ago) Jan 20
to Robert Griesemer, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Cherry Mui, Dmitri Shuralyov, golang-co...@googlegroups.com

Gopher Robot submitted the change with unreviewed changes

Unreviewed changes

1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: _content/doc/go1.26.md
Insertions: 4, Deletions: 4.

@@ -51,15 +51,15 @@
has been lifted.
It is now possible to specify type constraints that refer to the generic type being
constrained.
-For instance, a generic type `Addable` may require that it be instantiated with a
-type that is also "addable":
+For instance, a generic type `Adder` may require that it be instantiated with a
+type that is like itself:

```go
-type Addable[A Addable[A]] interface {
+type Adder[A Adder[A]] interface {
Add(A) A
}

-func algo[A Addable[A]](x, y A) A {
+func algo[A Adder[A]](x, y A) A {
return x.Add(y)
}
```
```

Change information

Commit message:
_content/doc/go1.26: document removal of cycle restriction for type parameters

For golang/go#75005.
For golang/go#75883.
Change-Id: I5317913aecc82bd941067863c0a6ea7ae06451f3
Reviewed-by: Cherry Mui <cher...@google.com>
Reviewed-by: Robert Griesemer <g...@google.com>
Auto-Submit: Robert Griesemer <g...@google.com>
Files:
Change size: S
Delta: 1 file changed, 22 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Robert Griesemer, +2 by Cherry Mui
  • 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: website
Gerrit-Branch: master
Gerrit-Change-Id: I5317913aecc82bd941067863c0a6ea7ae06451f3
Gerrit-Change-Number: 737600
Gerrit-PatchSet: 3
Gerrit-Owner: Robert Griesemer <g...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages