mirror of
https://github.com/golang/go
synced 2024-11-12 07:40:23 -07:00
reject struct to interface conversion for now
R=ken OCL=21007 CL=21007
This commit is contained in:
parent
9ba97ca308
commit
73653841af
@ -2733,7 +2733,12 @@ isandss(Type *lt, Node *r)
|
||||
return I2I;
|
||||
return Inone;
|
||||
}
|
||||
if(isnilinter(lt) || ismethod(rt) != T)
|
||||
if(isnilinter(lt)) {
|
||||
if(!issimple[rt->etype] && !isptr[rt->etype])
|
||||
yyerror("using %T as interface is unimplemented", rt);
|
||||
return T2I;
|
||||
}
|
||||
if(ismethod(rt) != T)
|
||||
return T2I;
|
||||
return Inone;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user