For the same reason that go/syntax does not reject `make()` or `x, y, z = <-c`, I do
not believe it should reject missing indexes in 3-index slice operations. It's generally
more useful to be able to parse and understand what's there and reject the missing
indexes during type checking.
g% gofmt -w test/slice3err.go
test/slice3err.go:20:14: 2nd and 3rd index must be present full slice expression
test/slice3err.go:21:15: 2nd and 3rd index must be present full slice expression
test/slice3err.go:22:15: 2nd and 3rd index must be present full slice expression
test/slice3err.go:23:16: 2nd and 3rd index must be present full slice expression
test/slice3err.go:24:15: 2nd and 3rd index must be present full slice expression
test/slice3err.go:25:16: 2nd and 3rd index must be present full slice expression
test/slice3err.go:33:14: 2nd and 3rd index must be present full slice expression
test/slice3err.go:34:15: 2nd and 3rd index must be present full slice expression
test/slice3err.go:35:15: 2nd and 3rd index must be present full slice expression
test/slice3err.go:36:16: 2nd and 3rd index must be present full slice expression
test/slice3err.go:37:15: 2nd and 3rd index must be present full slice expression
g%
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: