ir.ClosureExpr implements ir.InitNode, so ir.InitExpr can prepend init
statements to it. However, CalleeEffects wasn't aware of this and
could cause the init statements to get dropped when inlining a call to
This isn't an issue today, because we don't create closures with init
statements. But I ran into this within unified IR.
Easy and robust solution: just take advantage that ir.TakeInit can
handle any node.
Reviewed-by: Than McIntosh <firstname.lastname@example.org>
Run-TryBot: Matthew Dempsky <email@example.com>
TryBot-Result: Gopher Robot <firstname.lastname@example.org>
Reviewed-by: Cuong Manh Le <email@example.com>
Reviewed-by: Michael Knyszek <firstname.lastname@example.org>