mirror of
https://github.com/golang/go
synced 2024-11-26 12:09:04 -07:00
fix:
type T []int var a []int var t = T(a) R=ken OCL=22341 CL=22341
This commit is contained in:
parent
d54abad06f
commit
1b7881adb4
@ -415,6 +415,12 @@ agen(Node *n, Node *res)
|
||||
fatal("agen: unknown op %N", n);
|
||||
break;
|
||||
|
||||
case OCONV:
|
||||
if(!eqtype(n->type, nl->type, 0))
|
||||
fatal("agen: non-trivial OCONV");
|
||||
agen(nl, res);
|
||||
return;
|
||||
|
||||
case OCALLMETH:
|
||||
cgen_callmeth(n, 0);
|
||||
cgen_aret(n, res);
|
||||
|
@ -563,8 +563,10 @@ loop:
|
||||
|
||||
// nil conversion
|
||||
if(eqtype(t, l->type, 0)) {
|
||||
if(l->op != ONAME)
|
||||
if(l->op != ONAME) {
|
||||
indir(n, l);
|
||||
n->type = t;
|
||||
}
|
||||
goto ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user