mirror of
https://github.com/golang/go
synced 2024-11-12 06:40:22 -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);
|
fatal("agen: unknown op %N", n);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OCONV:
|
||||||
|
if(!eqtype(n->type, nl->type, 0))
|
||||||
|
fatal("agen: non-trivial OCONV");
|
||||||
|
agen(nl, res);
|
||||||
|
return;
|
||||||
|
|
||||||
case OCALLMETH:
|
case OCALLMETH:
|
||||||
cgen_callmeth(n, 0);
|
cgen_callmeth(n, 0);
|
||||||
cgen_aret(n, res);
|
cgen_aret(n, res);
|
||||||
|
@ -563,8 +563,10 @@ loop:
|
|||||||
|
|
||||||
// nil conversion
|
// nil conversion
|
||||||
if(eqtype(t, l->type, 0)) {
|
if(eqtype(t, l->type, 0)) {
|
||||||
if(l->op != ONAME)
|
if(l->op != ONAME) {
|
||||||
indir(n, l);
|
indir(n, l);
|
||||||
|
n->type = t;
|
||||||
|
}
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user