Make some tweaks

This commit is contained in:
Sofia 2026-03-15 18:03:59 +02:00
parent 05da3db5e6
commit 167649d9e4
2 changed files with 5 additions and 3 deletions

View File

@ -8,4 +8,4 @@ function test()
return add(10)(15) return add(10)(15)
end end
global c = print(test()) local c = print(test())

View File

@ -282,12 +282,14 @@ impl ClosureRunner {
} }
_ => { _ => {
dbg!(&value); dbg!(&value);
if *ret_len > 0 {
for i in 0..=(*ret_len - 2) { for i in 0..=(*ret_len - 2) {
self.stack.insert(*func_reg + i, Value::Nil); self.stack.insert(*func_reg + i, Value::Nil);
} }
} }
} }
} }
}
Instruction::Close(_) => {} Instruction::Close(_) => {}
Instruction::Closure(reg, protok) => { Instruction::Closure(reg, protok) => {
let highest_upvalue = self let highest_upvalue = self