From eaa92e027b005139e8c5c982d70b585a8940125c Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 25 Jun 2009 14:43:55 -0700 Subject: [PATCH] Allow indexing of slice types, but not pointer to slice type. Allow indexing of string type, but not pointer to string type. Do not allow indexing of pointer to map type. R=r DELTA=18 (14 added, 0 deleted, 4 changed) OCL=30586 CL=30754 --- doc/go_spec.html | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 37faf1c905..ef39535d6f 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -2155,17 +2155,31 @@ The value x is called the array index or map key, respectively. The following rules apply:

+

For a of type A or *A -where A is an array type (§Array types): +where A is an array type (§Array types), +or for a of type S where S is a slice type (§Slice types):

+ +

+For a of type T +where T is a string type (§Strings): +

+ +

-For a of type M or *M +For a of type M where M is a map type (§Map types):