]> Cypherpunks repositories - gostls13.git/commit
go spec: restrictions for index and slice expressions
authorRobert Griesemer <gri@golang.org>
Wed, 17 Oct 2012 18:08:42 +0000 (11:08 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 17 Oct 2012 18:08:42 +0000 (11:08 -0700)
commitea7c57a03135118dde12cb27b735c48c24c88b37
tree5f3317c485eee824ced7a5810ab3952756f5c67d
parenta2659aa6a105e6ae4fd3debcf4f4d8c79a6b4f4d
go spec: restrictions for index and slice expressions

At the moment, gc and gccgo report compile-
time errors for certain constant indexes that
are out of bounds. The spec however requests
a run-time panic for out-of-bounds indexes
(http://tip.golang.org/ref/spec#Indexes).

Document the status quo.

Fixes #4231.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/6699048
doc/go_spec.html