mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-27 02:24:15 +03:00
Merge pull request #3097 from AleoHQ/fix/codegen-for-futures
[Fix] Codegen for futures.
This commit is contained in:
commit
35a913327c
@ -225,7 +225,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
// If the function contained calls that produced futures, then we need to add the futures to the finalize block as input.
|
||||
// Store the new future registers.
|
||||
let mut future_registers = Vec::new();
|
||||
for (_, future_type) in &self.futures {
|
||||
for (_, future_type) in self.futures.drain(..) {
|
||||
let register_string = format!("r{}", self.next_register);
|
||||
writeln!(function_string, " input {register_string} as {future_type}.future;")
|
||||
.expect("failed to write to string");
|
||||
|
Loading…
Reference in New Issue
Block a user