Skip to content

Commit

Permalink
Cargo tests now pass
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed Sep 11, 2024
1 parent 1cbdb6c commit 2a9faf7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions crates/aiken-lang/src/gen_uplc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ impl<'a> CodeGenerator<'a> {

let name_interned = introduce_name(&mut self.interner, &name);

let casted_var = AirTree::local_var(&name, tipo.clone());
let casted_var = AirTree::local_var(&name_interned, tipo.clone());

let tree = if elements.is_empty() {
assign_casted_value(
Expand Down Expand Up @@ -3322,11 +3322,15 @@ impl<'a> CodeGenerator<'a> {
then,
)
}
Pattern::Assign { name, pattern, .. } => AirTree::let_assignment(
name,
AirTree::local_var(&props.clause_var_name, subject_tipo.clone()),
self.nested_clause_condition(pattern, subject_tipo, props, then),
),
Pattern::Assign { name, pattern, .. } => {
let name = self.interner.lookup_interned(name);

AirTree::let_assignment(
name,
AirTree::local_var(&props.clause_var_name, subject_tipo.clone()),
self.nested_clause_condition(pattern, subject_tipo, props, then),
)
}
Pattern::Discard { .. } => then,
Pattern::List { elements, tail, .. } => {
props.complex_clause = true;
Expand Down

0 comments on commit 2a9faf7

Please sign in to comment.