mirror of
https://github.com/golang/go
synced 2024-11-22 02:54:39 -07:00
gc: avoid DOT in error messages
R=ken2 CC=golang-dev https://golang.org/cl/5573047
This commit is contained in:
parent
eb984f524e
commit
bf0c190343
@ -2156,7 +2156,7 @@ adddot(Node *n)
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
if(c > 1)
|
if(c > 1)
|
||||||
yyerror("ambiguous DOT reference %T.%S", t, s);
|
yyerror("ambiguous selector %T.%S", t, s);
|
||||||
|
|
||||||
// rebuild elided dots
|
// rebuild elided dots
|
||||||
for(c=d-1; c>=0; c--)
|
for(c=d-1; c>=0; c--)
|
||||||
|
@ -1564,7 +1564,7 @@ lookdot1(Sym *s, Type *t, Type *f, int dostrcmp)
|
|||||||
if(f->sym != s)
|
if(f->sym != s)
|
||||||
continue;
|
continue;
|
||||||
if(r != T) {
|
if(r != T) {
|
||||||
yyerror("ambiguous DOT reference %T.%S", t, s);
|
yyerror("ambiguous selector %T.%S", t, s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
r = f;
|
r = f;
|
||||||
@ -1656,7 +1656,7 @@ lookdot(Node *n, Type *t, int dostrcmp)
|
|||||||
|
|
||||||
if(f1 != T) {
|
if(f1 != T) {
|
||||||
if(f2 != T)
|
if(f2 != T)
|
||||||
yyerror("ambiguous DOT reference %S as both field and method",
|
yyerror("%S is both field and method",
|
||||||
n->right->sym);
|
n->right->sym);
|
||||||
if(f1->width == BADWIDTH)
|
if(f1->width == BADWIDTH)
|
||||||
fatal("lookdot badwidth %T %p", f1, f1);
|
fatal("lookdot badwidth %T %p", f1, f1);
|
||||||
|
Loading…
Reference in New Issue
Block a user