Skip to content

Commit

Permalink
Merge pull request #3097 from AleoHQ/fix/codegen-for-futures
Browse files Browse the repository at this point in the history
[Fix] Codegen for futures.
  • Loading branch information
d0cd authored Oct 27, 2023
2 parents f27531f + dc4668b commit 35a9133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/passes/src/code_generation/visit_program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 35a9133

Please sign in to comment.