From 0f55c669515103bf9fa32638467748e8fb0c51e3 Mon Sep 17 00:00:00 2001 From: microproofs Date: Wed, 30 Oct 2024 20:43:58 -0400 Subject: [PATCH] Fix more tests and issues --- crates/aiken-lang/src/gen_uplc/decision_tree.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/aiken-lang/src/gen_uplc/decision_tree.rs b/crates/aiken-lang/src/gen_uplc/decision_tree.rs index eb46aa9f9..95dcfcec7 100644 --- a/crates/aiken-lang/src/gen_uplc/decision_tree.rs +++ b/crates/aiken-lang/src/gen_uplc/decision_tree.rs @@ -1039,9 +1039,11 @@ impl<'a, 'b> TreeGen<'a, 'b> { unreachable!("{:#?}", current_tipo) }; elems.len() - } else if let Some(data) = lookup_data_type_by_tipo(self.data_types, subject_tipo) { + } else if let Some(data) = lookup_data_type_by_tipo(self.data_types, ¤t_tipo) { if data.constructors.len() == 1 { data.constructors[0].arguments.len() + } else if data.is_never() { + 0 } else { MIN_NEW_COLUMNS } @@ -1092,7 +1094,7 @@ impl<'a, 'b> TreeGen<'a, 'b> { } => { let data_type = lookup_data_type_by_tipo(self.data_types, ¤t_tipo).unwrap(); - if data_type.constructors.len() == 1 { + if data_type.constructors.len() == 1 || data_type.is_never() { arguments .iter() .enumerate()