mirror of
https://github.com/golang/go
synced 2024-11-25 06:57:58 -07:00
fix error converting result of complex
division. resolves issue 1261. R=rsc CC=golang-dev https://golang.org/cl/2985043
This commit is contained in:
parent
56bfe95e7f
commit
cb3754fd43
@ -1005,9 +1005,11 @@ walkexpr(Node **np, NodeList **init)
|
|||||||
*/
|
*/
|
||||||
et = n->left->type->etype;
|
et = n->left->type->etype;
|
||||||
if(iscomplex[et] && n->op == ODIV) {
|
if(iscomplex[et] && n->op == ODIV) {
|
||||||
n = mkcall("complex128div", n->type, init,
|
t = n->type;
|
||||||
|
n = mkcall("complex128div", types[TCOMPLEX128], init,
|
||||||
conv(n->left, types[TCOMPLEX128]),
|
conv(n->left, types[TCOMPLEX128]),
|
||||||
conv(n->right, types[TCOMPLEX128]));
|
conv(n->right, types[TCOMPLEX128]));
|
||||||
|
n = conv(n, t);
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user