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
A "fallthrough" statement transfers control to the first statement of the next case clause in an expression "switch" statement. It may be used only as the final non-empty statement in such a clause.
go/types doesn't currently permit trailing empty statements:
$ cat x.go
package p
func x(x int) {
switch x {
case 0:
fallthrough
;
default:
}
}
produces:
$ gotype x.go
x.go:6:3: fallthrough statement out of place
The text was updated successfully, but these errors were encountered:
Per the spec:
go/types doesn't currently permit trailing empty statements:
produces:
The text was updated successfully, but these errors were encountered: