Fixes #54973
Change-Id: Ibad9dd124617a1bbc23abd17cbd6e9e9928e3ed9
GitHub-Last-Rev:
1c6affb967ef925ec12420e31c6423a615f90acc
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>
</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