fix: function hoisting errors --

One involving zero args being hoisted instead of compiled and replaced.
Second involving not updating a function's dependeny function scope. Which then hoisted to a lower scope and caused free unique
This commit is contained in:
Kasey White
2023-03-27 14:39:21 -04:00
committed by Lucas
parent 703429af98
commit 822bb4242a
2 changed files with 12 additions and 5 deletions

View File

@@ -1473,7 +1473,7 @@ pub fn handle_func_dependencies(
let dep_scope = func_index_map.get(&dependency).unwrap();
if dep_scope.common_ancestor(func_scope) == *func_scope
if (dep_scope.common_ancestor(func_scope) == *func_scope && !depend_comp.args.is_empty())
|| function_component.args.is_empty()
{
let mut recursion_ir = vec![];