chore: fix list insertion order, function insertion order,
and Inner function issues with variant
This commit is contained in:
parent
0d0e698d5e
commit
2bce818110
|
@ -1173,10 +1173,12 @@ pub fn monomorphize(
|
|||
}
|
||||
|
||||
if let Type::Fn { args, .. } = &**full_type {
|
||||
if full_type.is_generic() {
|
||||
for arg in args {
|
||||
get_variant_name(&mut new_name, arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(new_name, new_air)
|
||||
}
|
||||
|
|
|
@ -1576,7 +1576,7 @@ impl<'a> CodeGenerator<'a> {
|
|||
variant_name: function_access_key.variant_name.clone(),
|
||||
});
|
||||
|
||||
for (index, ir) in func_comp.ir.clone().iter().enumerate() {
|
||||
for (index, ir) in func_comp.ir.clone().iter().enumerate().rev() {
|
||||
match_ir_for_recursion(
|
||||
ir.clone(),
|
||||
&mut insert_var_vec,
|
||||
|
@ -2182,7 +2182,7 @@ impl<'a> CodeGenerator<'a> {
|
|||
Term::Constant(UplcConstant::ProtoList(UplcType::Data, vec![]))
|
||||
};
|
||||
|
||||
for arg in args {
|
||||
for arg in args.into_iter().rev() {
|
||||
let list_item = if tipo.is_map() {
|
||||
arg
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,7 @@ pub fn new() {
|
|||
Map { inner: [] }
|
||||
}
|
||||
|
||||
// Seems to be an issue with the parser. The TypedExpr body is excluding the Equal binop.
|
||||
test new_1() {
|
||||
new() == Map { inner: [] }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue