mirror of
https://github.com/golang/go
synced 2024-09-24 21:00:13 -06: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;
|
||||
|
||||
// check types
|
||||
// TODO(rsc): map, chan etc are not quite right
|
||||
if(!issimple[t->etype])
|
||||
switch(t->etype) {
|
||||
default:
|
||||
return T;
|
||||
case TSTRUCT:
|
||||
case TARRAY:
|
||||
case TMAP:
|
||||
case TCHAN:
|
||||
case TSTRING:
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user