Commit a3cdd2e8 authored by Ken Thompson's avatar Ken Thompson

bug

R=r
OCL=17853
CL=17853
parent 6d3d56d5
...@@ -2586,12 +2586,15 @@ expandmeth(Sym *s, Type *t) ...@@ -2586,12 +2586,15 @@ expandmeth(Sym *s, Type *t)
if(t == T) if(t == T)
return; return;
//print("s=%S t=%lT\n", s, t);
// generate all reachable methods // generate all reachable methods
slist = nil; slist = nil;
expand1(t, nelem(dotlist)-1); expand1(t, nelem(dotlist)-1);
// check each method to be uniquely reachable // check each method to be uniquely reachable
for(sl=slist; sl!=nil; sl=sl->link) { for(sl=slist; sl!=nil; sl=sl->link) {
sl->field->sym->uniq = 0;
for(d=0; d<nelem(dotlist); d++) { for(d=0; d<nelem(dotlist); d++) {
c = adddot1(sl->field->sym, t, d); c = adddot1(sl->field->sym, t, d);
if(c == 0) if(c == 0)
...@@ -2604,6 +2607,7 @@ expandmeth(Sym *s, Type *t) ...@@ -2604,6 +2607,7 @@ expandmeth(Sym *s, Type *t)
for(sl=slist; sl!=nil; sl=sl->link) { for(sl=slist; sl!=nil; sl=sl->link) {
if(sl->good) { if(sl->good) {
//print(" %lT\n", sl->field);
// add it to the base type method list // add it to the base type method list
f = typ(TFIELD); f = typ(TFIELD);
*f = *sl->field; *f = *sl->field;
......
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