]> Cypherpunks repositories - gostls13.git/commitdiff
gc: avoid DOT in error messages
authorRuss Cox <rsc@golang.org>
Mon, 23 Jan 2012 20:10:53 +0000 (15:10 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 23 Jan 2012 20:10:53 +0000 (15:10 -0500)
R=ken2
CC=golang-dev
https://golang.org/cl/5573047

src/cmd/gc/subr.c
src/cmd/gc/typecheck.c

index 4e9f9e05fdeb71d51160af20b065dca55e8d2333..9c31dace4c34ae10bdb311b1cdb8ee213291d177 100644 (file)
@@ -2156,7 +2156,7 @@ adddot(Node *n)
 
 out:
        if(c > 1)
-               yyerror("ambiguous DOT reference %T.%S", t, s);
+               yyerror("ambiguous selector %T.%S", t, s);
 
        // rebuild elided dots
        for(c=d-1; c>=0; c--)
index 1092608dc9504e0ec503589ba440d25014278dbb..f9f0d8b301d6dddcf81827c0355ae2cab8026921 100644 (file)
@@ -1564,7 +1564,7 @@ lookdot1(Sym *s, Type *t, Type *f, int dostrcmp)
                if(f->sym != s)
                        continue;
                if(r != T) {
-                       yyerror("ambiguous DOT reference %T.%S", t, s);
+                       yyerror("ambiguous selector %T.%S", t, s);
                        break;
                }
                r = f;
@@ -1656,7 +1656,7 @@ lookdot(Node *n, Type *t, int dostrcmp)
 
        if(f1 != T) {
                if(f2 != T)
-                       yyerror("ambiguous DOT reference %S as both field and method",
+                       yyerror("%S is both field and method",
                                n->right->sym);
                if(f1->width == BADWIDTH)
                        fatal("lookdot badwidth %T %p", f1, f1);