]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gc: fix comment about performing indexing at compile time.
authorKeith Randall <khr@golang.org>
Mon, 14 Oct 2013 21:26:52 +0000 (14:26 -0700)
committerKeith Randall <khr@golang.org>
Mon, 14 Oct 2013 21:26:52 +0000 (14:26 -0700)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14441070

src/cmd/gc/walk.c

index 495223e149b172fb12dac09f26a6cb8767900ef0..66409d5305cc73d10dbfbef1f6e4e27a6b32d7e9 100644 (file)
@@ -1044,8 +1044,8 @@ walkexpr(Node **np, NodeList **init)
                                if(!n->bounded)
                                        yyerror("index out of bounds");
                                else {
-                                       // replace "abc"[2] with 'b'.
-                                       // delayed until now because "abc"[2] is not
+                                       // replace "abc"[1] with 'b'.
+                                       // delayed until now because "abc"[1] is not
                                        // an ideal constant.
                                        v = mpgetfix(n->right->val.u.xval);
                                        nodconst(n, n->type, n->left->val.u.sval->s[v]);