Skip to content

Commit

Permalink
Fix more tests and issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed Oct 31, 2024
1 parent 9d7e053 commit 0f55c66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/aiken-lang/src/gen_uplc/decision_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, &current_tipo) {
if data.constructors.len() == 1 {
data.constructors[0].arguments.len()
} else if data.is_never() {
0
} else {
MIN_NEW_COLUMNS
}
Expand Down Expand Up @@ -1092,7 +1094,7 @@ impl<'a, 'b> TreeGen<'a, 'b> {
} => {
let data_type = lookup_data_type_by_tipo(self.data_types, &current_tipo).unwrap();

if data_type.constructors.len() == 1 {
if data_type.constructors.len() == 1 || data_type.is_never() {
arguments
.iter()
.enumerate()
Expand Down

0 comments on commit 0f55c66

Please sign in to comment.