fixes to how we sort dependencies.

Also update dependency path based on a functions path.
This commit is contained in:
microproofs
2023-07-29 18:52:36 -04:00
committed by Kasey
parent 80b950b8aa
commit 3189a60bdb
3 changed files with 77 additions and 39 deletions

View File

@@ -607,6 +607,18 @@ pub fn modify_self_calls(air_tree: &mut AirTree, func_key: &FunctionAccessKey, v
}
}
pub fn remove_tuple_data_casts(air_tree: &mut AirTree) {
if let AirTree::Expression(AirExpression::List { items, tipo, .. }) = air_tree {
for item in items {
if let AirTree::Expression(AirExpression::CastToData { value, tipo }) = item {
if tipo.is_2_tuple() {
*item = (**value).clone();
}
}
}
}
}
pub fn pattern_has_conditions(pattern: &TypedPattern) -> bool {
match pattern {
Pattern::Constructor {

View File

@@ -1381,7 +1381,7 @@ impl AirTree {
) {
let mut index_count = IndexCounter::new();
tree_path.push(current_depth, depth_index);
with(self, tree_path);
match self {
AirTree::Statement {
statement,
@@ -1772,7 +1772,7 @@ impl AirTree {
},
a => unreachable!("GOT THIS {:#?}", a),
}
with(self, tree_path);
tree_path.pop();
}