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
The optional semicolon is a possible tripping point for people new to Go language. Since
it
seems that changing it to be required will not happen, we should have good diagnostics
to help
people know when it has been omitted incorrectly.
Consider foo.go:
package main
func main() {
i := 1
i = i + i
}
If you do 6g foo.go, the error message printed is:
$ 6g foo.go
foo.go:4: syntax error near i
The error message should be more detailed since new users may have trouble finding the
problem:
foo.go:4: statements in functions must be separated by semicolons
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: