Commit 2acb80b5 authored by Keith Randall's avatar Keith Randall

cmd/gc: fix comment about performing indexing at compile time.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14441070
parent 21e6b90d
......@@ -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]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment