From a4aaf4d2d7b97557072a13eab40c02fcd1e685b5 Mon Sep 17 00:00:00 2001 From: microproofs Date: Thu, 31 Oct 2024 01:37:03 -0400 Subject: [PATCH] Last issue from acceptance tests --- .../aiken-lang/src/gen_uplc/decision_tree.rs | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/crates/aiken-lang/src/gen_uplc/decision_tree.rs b/crates/aiken-lang/src/gen_uplc/decision_tree.rs index 96b9951f..a3fc94be 100644 --- a/crates/aiken-lang/src/gen_uplc/decision_tree.rs +++ b/crates/aiken-lang/src/gen_uplc/decision_tree.rs @@ -1070,13 +1070,19 @@ impl<'a, 'b> TreeGen<'a, 'b> { .collect_vec(), ), - Pattern::Assign { name, pattern, .. } => ( - vec![Assigned { - path: path.clone(), - assigned: name.clone(), - }], - self.map_pattern_to_row(pattern, subject_tipo, path).1, - ), + Pattern::Assign { name, pattern, .. } => { + let (mut assigns, patts) = + self.map_pattern_to_row(pattern, subject_tipo, path.clone()); + + assigns.insert( + 0, + Assigned { + path, + assigned: name.clone(), + }, + ); + (assigns, patts) + } Pattern::Int { .. } | Pattern::ByteArray { .. } | Pattern::Discard { .. }