Merge pull request #8446 from AleoHQ/fix/codegen-arrays

Fix codegen for array init expressions
This commit is contained in:
d0cd 2023-11-23 12:06:37 -08:00 committed by GitHub
commit 9050bc8da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ impl<'a> CodeGenerator<'a> {
input.elements.iter().map(|expr| self.visit_expression(expr)).fold(
(String::new(), String::new()),
|(mut operands, mut instructions), (operand, operand_instructions)| {
operands.push_str(&operand);
operands.push_str(&format!(" {operand}"));
instructions.push_str(&operand_instructions);
(operands, instructions)
},

View File

@ -12,5 +12,5 @@ outputs:
destructured_ast: a289bf8f301f816aff01ea96edbd593ee691cbf6ef0899fa48dd030b4c464bf8
inlined_ast: a289bf8f301f816aff01ea96edbd593ee691cbf6ef0899fa48dd030b4c464bf8
dce_ast: a289bf8f301f816aff01ea96edbd593ee691cbf6ef0899fa48dd030b4c464bf8
bytecode: d3da9d2e824607fc466b21e88b3d1a8e9674c68f55be8d40694b6a19c80cf25c
bytecode: 5adcc7b9450eedbada20f55565a821769e58c3cacb624d7e45061693d167a079
warnings: ""

View File

@ -12,5 +12,5 @@ outputs:
destructured_ast: 12970e30a633c72202544f4d9fcdd174a63d0cd52595a7cb499b92baf1da028f
inlined_ast: 12970e30a633c72202544f4d9fcdd174a63d0cd52595a7cb499b92baf1da028f
dce_ast: 12970e30a633c72202544f4d9fcdd174a63d0cd52595a7cb499b92baf1da028f
bytecode: 789b22bc0c6e954ae7fed24a064342bf0729393fab7e8d8206b0923f53240dd1
bytecode: be43f1b20093160fdfc6c5f85fbbe6c3693a41505738d4d0db70b1fcf2243a4f
warnings: ""