fixes to how we sort dependencies.
Also update dependency path based on a functions path.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user