Commit c860d1f7 authored by Hugo Moreau's avatar Hugo Moreau

LinkResults: fix typo

results was created according to the size of the caller and not the
results function. It is now corrected.

 * transform/cfg/linkresults.go : Here.
parent 7d93731b
Pipeline #26602 passed with stage
in 2 minutes and 18 seconds
......@@ -76,11 +76,9 @@ func (LinkResults) Pre(meta *transform.Meta, v *transform.Visitor) bool {
} else {
// Spread the function's result cells into the arguments of the
// outer function.
results = make([]ast.Expr, len(e.Args))
results = make([]ast.Expr, len(n.Args))
copy(results, e.Args)
if len(results) > 0 {
results[argIdx] = meta.Get(fr.Results[0])
}
results[argIdx] = meta.Get(fr.Results[0])
}
c.Replace(&ast.CallExpr{
Fun: n.Fun,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment