fix expect on tuple type using the wrong internal type
This commit is contained in:
parent
f03ed41e03
commit
018453f6b1
|
@ -1302,7 +1302,7 @@ impl<'a> CodeGenerator<'a> {
|
||||||
);
|
);
|
||||||
|
|
||||||
let expect_tuple_item = self.expect_type_assign(
|
let expect_tuple_item = self.expect_type_assign(
|
||||||
tipo,
|
arg,
|
||||||
AirTree::local_var(&tuple_index_name, arg.clone()),
|
AirTree::local_var(&tuple_index_name, arg.clone()),
|
||||||
defined_data_types,
|
defined_data_types,
|
||||||
location,
|
location,
|
||||||
|
|
|
@ -102,7 +102,6 @@ fn assert_uplc(source_code: &str, expected: Term<Name>, should_fail: bool) {
|
||||||
term: expected,
|
term: expected,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
let expected = optimize::aiken_optimize_and_intern(expected);
|
let expected = optimize::aiken_optimize_and_intern(expected);
|
||||||
|
|
||||||
let expected: Program<DeBruijn> = expected.try_into().unwrap();
|
let expected: Program<DeBruijn> = expected.try_into().unwrap();
|
||||||
|
@ -3770,8 +3769,7 @@ fn list_fields_unwrap() {
|
||||||
.lambda("item_1_fields")
|
.lambda("item_1_fields")
|
||||||
.apply(Term::var(CONSTR_FIELDS_EXPOSER).apply(Term::var("item_1")))
|
.apply(Term::var(CONSTR_FIELDS_EXPOSER).apply(Term::var("item_1")))
|
||||||
.lambda("item_1")
|
.lambda("item_1")
|
||||||
.apply(Term::head_list().apply(Term::var("field_list")))
|
.apply(Term::head_list().apply(Term::var("field_list"))),
|
||||||
|
|
||||||
)
|
)
|
||||||
.lambda("field_list")
|
.lambda("field_list")
|
||||||
.apply(Term::list_values(vec![
|
.apply(Term::list_values(vec![
|
||||||
|
@ -4210,7 +4208,9 @@ fn expect_head_cast_data_with_tail() {
|
||||||
)
|
)
|
||||||
.apply(Term::var("tail_2"))
|
.apply(Term::var("tail_2"))
|
||||||
.apply(
|
.apply(
|
||||||
Term::un_i_data().apply(Term::var("list_item")).lambda("list_item")
|
Term::un_i_data()
|
||||||
|
.apply(Term::var("list_item"))
|
||||||
|
.lambda("list_item"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.lambda("tail_2")
|
.lambda("tail_2")
|
||||||
|
|
Loading…
Reference in New Issue