mirror of
https://github.com/golang/go
synced 2024-10-02 22:25:08 +00:00
spec: allow range-over-func to omit iteration variables
For #65236. Change-Id: I5a11811cc52467ea4446db29c3f86b119f9b2409 Reviewed-on: https://go-review.googlesource.com/c/go/+/592295 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> TryBot-Bypass: Robert Griesemer <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
e15cc7ab82
commit
8219848c94
|
@ -1,6 +1,6 @@
|
|||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Language version go1.23 (June 4, 2024)",
|
||||
"Subtitle": "Language version go1.23 (June 12, 2024)",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
|
@ -6733,8 +6733,6 @@ to generate iteration values this way for each <code>yield</code> call until
|
|||
<code>f</code> returns.
|
||||
If the loop body terminates (such as by a <code>break</code> statement),
|
||||
<code>yield</code> returns false and must not be called again.
|
||||
The number of iteration variables must match the number and order of arguments
|
||||
to <code>yield</code>.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
|
Loading…
Reference in a new issue