From 82fc82ceee0685ce797a7ae4b25ce25855f75ac2 Mon Sep 17 00:00:00 2001 From: microproofs Date: Fri, 19 Jan 2024 13:49:53 -0500 Subject: [PATCH] fix: used wrong index in tupleAcessor --- crates/aiken-lang/src/gen_uplc.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/aiken-lang/src/gen_uplc.rs b/crates/aiken-lang/src/gen_uplc.rs index d4844b56..ca705d80 100644 --- a/crates/aiken-lang/src/gen_uplc.rs +++ b/crates/aiken-lang/src/gen_uplc.rs @@ -5242,14 +5242,14 @@ impl<'a> CodeGenerator<'a> { .lambda(names[0].clone()) .apply(if error_term != Term::Error { builder::convert_data_to_type_debug( - Term::snd_pair().apply(Term::var(format!("__tuple_{list_id}"))), - &inner_types[1], + Term::fst_pair().apply(Term::var(format!("__tuple_{list_id}"))), + &inner_types[0], error_term, ) } else { builder::convert_data_to_type( - Term::snd_pair().apply(Term::var(format!("__tuple_{list_id}"))), - &inner_types[1], + Term::fst_pair().apply(Term::var(format!("__tuple_{list_id}"))), + &inner_types[0], ) }) }