From 47014c6164618924bf6d89a775d0fc419dd2c44a Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Tue, 17 Dec 2024 19:32:30 +0100 Subject: [PATCH] lifting the restriction for inlining to allow normal functions as well Signed-off-by: Jakub Doka --- lang/src/son.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/src/son.rs b/lang/src/son.rs index e41fbf1c..fb13e543 100644 --- a/lang/src/son.rs +++ b/lang/src/son.rs @@ -2575,7 +2575,7 @@ impl<'a> Codegen<'a> { mem::replace(&mut self.ci.inline_ret, prev_inline_ret)?; if is_inline && ctrl.get() != prev_ctrl - && (!self.ci.nodes[ctrl.get()].kind.is_eca() + && (!self.ci.nodes[ctrl.get()].kind.is_call() || self.ci.nodes[ctrl.get()].inputs[0] != prev_ctrl) { self.error(body.pos(), "function is makred inline but it contains controlflow");