mirror of
https://github.com/golang/go
synced 2024-11-12 05:30:21 -07:00
now that TCHAN, TMAP, and TSTRING are real types,
can do methods on them without pointer worries. R=ken OCL=22434 CL=22436
This commit is contained in:
parent
c45d2a767c
commit
316d377ac2
@ -1556,13 +1556,15 @@ dclmethod(Type *t)
|
|||||||
t->methptr |= 1<<ptr;
|
t->methptr |= 1<<ptr;
|
||||||
|
|
||||||
// check types
|
// check types
|
||||||
// TODO(rsc): map, chan etc are not quite right
|
|
||||||
if(!issimple[t->etype])
|
if(!issimple[t->etype])
|
||||||
switch(t->etype) {
|
switch(t->etype) {
|
||||||
default:
|
default:
|
||||||
return T;
|
return T;
|
||||||
case TSTRUCT:
|
case TSTRUCT:
|
||||||
case TARRAY:
|
case TARRAY:
|
||||||
|
case TMAP:
|
||||||
|
case TCHAN:
|
||||||
|
case TSTRING:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user