disable assert that was blocking issue #844

This commit is contained in:
microproofs 2024-03-04 11:48:22 -05:00
parent 27eb1a3e04
commit c9dd281b45
4 changed files with 42 additions and 6 deletions

View File

@ -1499,8 +1499,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 without a tail
assert!(!(matches!(expect_level, ExpectLevel::None) && is_list_accessor && !tail_present));
// assert!(!(matches!(expect_level, ExpectLevel::None) && is_list_accessor && !tail_present));
let mut no_tailing_discards = names_types_ids
.iter()
@ -1524,11 +1524,11 @@ pub fn list_access_to_uplc(
if no_tailing_discards.is_empty() {
if tail_present || matches!(expect_level, ExpectLevel::None) {
return term.lambda("_");
} else {
return Term::var("empty_list")
.delayed_choose_list(term, error_term)
.lambda("empty_list");
}
return Term::var("empty_list")
.delayed_choose_list(term, error_term)
.lambda("empty_list");
}
// reverse back to original order

View File

@ -0,0 +1,7 @@
# This file was generated by Aiken
# You typically do not need to edit this file
requirements = []
packages = []
[etags]

View File

@ -0,0 +1,3 @@
name = "aiken-lang/acceptance_test_095"
version = "0.0.0"
description = ""

View File

@ -0,0 +1,26 @@
fn sum_relative_collateral_values(
in_values: List<((ByteArray, ByteArray), Int)>,
out_values: List<((ByteArray, ByteArray), Int)>,
_collateral_is_swappable: Bool,
acc: (Int, Int),
) -> (Int, Int) {
when (in_values, out_values) is {
([(_inAsset, _inVal), ..], [(_outAsset, _outVal), ..]) -> acc
([(_, _inVal), ..], []) -> acc
([], [(_, _outVal), ..]) -> acc
([], []) -> acc
}
// This was the only thing changed.
}
test thing() {
(0, 0) == sum_relative_collateral_values(
[(("", ""), 0)],
[(("", ""), 0)],
False,
(0, 0),
)
}