]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gc: rephrase the invalid indexing operation error message
authorShenghou Ma <minux.ma@gmail.com>
Fri, 14 Feb 2014 02:01:33 +0000 (21:01 -0500)
committerShenghou Ma <minux.ma@gmail.com>
Fri, 14 Feb 2014 02:01:33 +0000 (21:01 -0500)
Old:
prog.go:9: invalid operation: this[i] (index of type int)
New:
prog.go:9: invalid operation: this[i] (type int does not support indexing)

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/52540043

src/cmd/gc/typecheck.c

index 15d1dfbace379f1fdfbe77709b9b5af73cad2588..9e1ec1012489fb7d97499b05b21f31069907fc62 100644 (file)
@@ -866,7 +866,7 @@ reswitch:
                        goto error;
                switch(t->etype) {
                default:
-                       yyerror("invalid operation: %N (index of type %T)", n, t);
+                       yyerror("invalid operation: %N (type %T does not support indexing)", n, t);
                        goto error;