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
Does this issue reproduce with the latest release?
yes
What did you do?
package main
func main() {
// The following line compiles error:
// syntax error: unexpected return at end of statement
statRuneCount := func (s string) (n int) {for range s {n++} return}
println(statRuneCount("abc"))
}
What did you expect to see?
No errors.
What did you see instead?
./a.go:6:62: syntax error: unexpected return at end of statemen
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?go version go1.10.1 linux/amd64
Does this issue reproduce with the latest release?
yes
What did you do?
What did you expect to see?
No errors.
What did you see instead?
The text was updated successfully, but these errors were encountered: