Browse Source

Fix invalid return value when closing an iterator (#3567)

pull/3569/head
raskad 11 months ago committed by GitHub
parent
commit
6c5dfe0069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      core/engine/src/vm/opcode/iteration/iterator.rs

4
core/engine/src/vm/opcode/iteration/iterator.rs

@ -250,8 +250,12 @@ impl Operation for IteratorReturn {
return Ok(CompletionType::Normal); return Ok(CompletionType::Normal);
}; };
let return_value = context.vm.get_return_value();
let value = ret.call(&record.iterator().clone().into(), &[], context)?; let value = ret.call(&record.iterator().clone().into(), &[], context)?;
context.vm.set_return_value(return_value);
context.vm.push(value); context.vm.push(value);
context.vm.push(true); context.vm.push(true);

Loading…
Cancel
Save