Fix: Clone closure directly for tail calls
This commit is contained in:
+1
-1
@@ -511,7 +511,7 @@ impl VM {
|
||||
let frame = self.frames.last().ok_or("No call frame for 'again'")?;
|
||||
if let Some(closure) = &frame.closure {
|
||||
Ok(Value::TailCallRequest(Box::new((
|
||||
Rc::new(closure.as_ref().clone()) as Rc<dyn Object>,
|
||||
closure.clone() as Rc<dyn Object>,
|
||||
arg_vals,
|
||||
))))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user