fixing the inline flag delegation with generic functions
This commit is contained in:
parent
9949086011
commit
80fd0e89b4
|
@ -3850,11 +3850,11 @@ impl<'a> Codegen<'a> {
|
|||
|
||||
let (v, ctrl, scope) = mem::replace(&mut self.ci.inline_ret, prev_inline_ret)?;
|
||||
if is_inline
|
||||
&& (ctrl.get() != prev_ctrl
|
||||
&& (!matches!(self.ci.nodes[ctrl.get()].kind, Kind::Call {
|
||||
func: ty::Func::ECA,
|
||||
..
|
||||
}) || self.ci.nodes[ctrl.get()].inputs[0] != prev_ctrl))
|
||||
&& ctrl.get() != prev_ctrl
|
||||
&& (!matches!(self.ci.nodes[ctrl.get()].kind, Kind::Call {
|
||||
func: ty::Func::ECA,
|
||||
..
|
||||
}) || self.ci.nodes[ctrl.get()].inputs[0] != prev_ctrl)
|
||||
{
|
||||
self.report(body.pos(), "function is makred inline but it contains controlflow");
|
||||
}
|
||||
|
@ -4075,6 +4075,7 @@ impl<'a> Codegen<'a> {
|
|||
base: Some(*func),
|
||||
sig: Some(Sig { args, ret }),
|
||||
expr: fuc.expr,
|
||||
is_inline: fuc.is_inline,
|
||||
..Default::default()
|
||||
})
|
||||
.into()
|
||||
|
|
Loading…
Reference in a new issue