mirror of
https://github.com/golang/go
synced 2024-09-25 13:20:13 -06:00
Automated g4 rollback of changelist 17815.
*** Reason for rollback *** now it's comparing function parameter names... *** Original change description *** fix method function type compare bug R=ken OCL=17816 CL=17816
This commit is contained in:
parent
0be746d581
commit
c14c961ae4
@ -279,10 +279,8 @@ addmethod(Node *n, Type *t, int local)
|
|||||||
d = f;
|
d = f;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!eqtype(t, f->type, 0)) {
|
if(!eqtype(t, f->type, 0))
|
||||||
yyerror("method redeclared: %S of type %S", sf, st);
|
yyerror("method redeclared: %S of type %S", sf, st);
|
||||||
print("\t%T\n\t%T\n", f->type, t);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,8 +340,7 @@ funchdr(Node *n)
|
|||||||
if(!eqargs(n->type, on->type))
|
if(!eqargs(n->type, on->type))
|
||||||
yyerror("forward declarations not the same: %S", s);
|
yyerror("forward declarations not the same: %S", s);
|
||||||
} else {
|
} else {
|
||||||
yyerror("function redeclared: %S", s);
|
yyerror("redeclare of function: %S", s);
|
||||||
print("\t%T\n\t%T\n", on->type, n->type);
|
|
||||||
on = N;
|
on = N;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1773,7 +1773,7 @@ eqtype(Type *t1, Type *t2, int d)
|
|||||||
if(t1->etype != TSTRUCT || t2->etype != TSTRUCT)
|
if(t1->etype != TSTRUCT || t2->etype != TSTRUCT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(!eqtype(t1, t2, 0))
|
if(!eqtype(t1->type, t2->type, 0))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
t1 = t1->down;
|
t1 = t1->down;
|
||||||
|
Loading…
Reference in New Issue
Block a user