disable assert that was blocking issue #844
This commit is contained in:
parent
27eb1a3e04
commit
c9dd281b45
|
@ -1499,8 +1499,8 @@ pub fn list_access_to_uplc(
|
||||||
error_term: Term<Name>,
|
error_term: Term<Name>,
|
||||||
) -> Term<Name> {
|
) -> Term<Name> {
|
||||||
let names_len = names_types_ids.len();
|
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
|
let mut no_tailing_discards = names_types_ids
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -1524,12 +1524,12 @@ pub fn list_access_to_uplc(
|
||||||
if no_tailing_discards.is_empty() {
|
if no_tailing_discards.is_empty() {
|
||||||
if tail_present || matches!(expect_level, ExpectLevel::None) {
|
if tail_present || matches!(expect_level, ExpectLevel::None) {
|
||||||
return term.lambda("_");
|
return term.lambda("_");
|
||||||
} else {
|
}
|
||||||
|
|
||||||
return Term::var("empty_list")
|
return Term::var("empty_list")
|
||||||
.delayed_choose_list(term, error_term)
|
.delayed_choose_list(term, error_term)
|
||||||
.lambda("empty_list");
|
.lambda("empty_list");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// reverse back to original order
|
// reverse back to original order
|
||||||
no_tailing_discards.reverse();
|
no_tailing_discards.reverse();
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
# This file was generated by Aiken
|
||||||
|
# You typically do not need to edit this file
|
||||||
|
|
||||||
|
requirements = []
|
||||||
|
packages = []
|
||||||
|
|
||||||
|
[etags]
|
|
@ -0,0 +1,3 @@
|
||||||
|
name = "aiken-lang/acceptance_test_095"
|
||||||
|
version = "0.0.0"
|
||||||
|
description = ""
|
|
@ -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),
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue