spec: fix typo in a type parameter example

Fixes #54973

Change-Id: Ibad9dd124617a1bbc23abd17cbd6e9e9928e3ed9
GitHub-Last-Rev: 1c6affb967
GitHub-Pull-Request: golang/go#55021
Reviewed-on: https://go-review.googlesource.com/c/go/+/430316
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
VRDighe 2022-09-14 04:25:55 +00:00 committed by Robert Griesemer
parent 1e96f42c2a
commit 0bfa9f0435
1 changed files with 1 additions and 1 deletions

View File

@ -4265,7 +4265,7 @@ to be inferred. Loosely speaking, type arguments may be omitted from "right to l
</p>
<pre>
func apply[S ~[]E, E any](s S, f(E) E) S { … }
func apply[S ~[]E, E any](s S, f func(E) E) S { … }
f0 := apply[] // illegal: type argument list cannot be empty
f1 := apply[[]int] // type argument for S explicitly provided, type argument for E inferred