You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
playing with range over funcs, got the following error: range over all (value of type func(yield func(a int, b int) bool)) must have two iteration variables
please see the code in the playground: https://go.dev/play/p/HHJaatn3WAl?v=gotip
What did you see happen?
got the compiler error: ./prog.go:14:17: range over all (value of type func(yield func(a int, b int) bool)) must have two iteration variables
What did you expect to see?
no compiler error, the spec says it is allowed to omit unwanted variables:
Go version
gotip
Output of
go env
in your module/workspace:What did you do?
playing with range over funcs, got the following error:
range over all (value of type func(yield func(a int, b int) bool)) must have two iteration variables
please see the code in the playground: https://go.dev/play/p/HHJaatn3WAl?v=gotip
What did you see happen?
got the compiler error:
./prog.go:14:17: range over all (value of type func(yield func(a int, b int) bool)) must have two iteration variables
What did you expect to see?
no compiler error, the spec says it is allowed to omit unwanted variables:
The text was updated successfully, but these errors were encountered: