diff --git a/lang/src/son.rs b/lang/src/son.rs index 8a87b33..764d874 100644 --- a/lang/src/son.rs +++ b/lang/src/son.rs @@ -4582,8 +4582,6 @@ impl<'a> Codegen<'a> { let ast = &self.files[file]; let &Expr::Closure { args: cargs, body, .. } = expr.get(ast) else { unreachable!() }; - inline |= sig.ret == ty::Id::TYPE; - let arg_count = args.len() + caller.is_some() as usize; if arg_count != cargs.len() { self.error( @@ -4604,6 +4602,8 @@ impl<'a> Codegen<'a> { ); } + inline |= sig.ret == ty::Id::TYPE; + let (mut tys, mut args, mut cargs) = (sig.args.args(), args.iter(), cargs.iter()); if is_inline || inline { let var_base = self.ci.scope.vars.len();