From 92a1da69d9dbc4d729e319e72fabdbad4d464614 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Thu, 18 Apr 2024 16:03:02 +0200 Subject: [PATCH] Add (possibly temporary) assertion on record access in codegen --- crates/aiken-lang/src/gen_uplc.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/aiken-lang/src/gen_uplc.rs b/crates/aiken-lang/src/gen_uplc.rs index 1acbb81f..cd7da698 100644 --- a/crates/aiken-lang/src/gen_uplc.rs +++ b/crates/aiken-lang/src/gen_uplc.rs @@ -647,6 +647,11 @@ impl<'a> CodeGenerator<'a> { record, .. } => { + assert!( + !record.tipo().is_pair(), + "illegal record access on a Pair. This should have been a tuple-index access." + ); + if check_replaceable_opaque_type(&record.tipo(), &self.data_types) { self.build(record, module_build_name, &[]) } else {