fix: assert had one minor edge case due to final clauses with lists

This commit is contained in:
microproofs 2024-01-31 00:05:09 -05:00
parent 444bccf19c
commit 551941392e
1 changed files with 2 additions and 2 deletions

View File

@ -1530,8 +1530,8 @@ pub fn list_access_to_uplc(
error_term: Term<Name>,
) -> Term<Name> {
let names_len = names_types_ids.len();
// Should never be expect level none on a list
assert!(!(matches!(expect_level, ExpectLevel::None) && is_list_accessor));
// Should never be expect level none on a list without a tail
assert!(!(matches!(expect_level, ExpectLevel::None) && is_list_accessor && !tail_present));
let mut no_tailing_discards = names_types_ids
.iter()