fix(visitors): prevent circular dependencies
This commit is contained in:
parent
ebd33b0a19
commit
a2d172d31d
|
@ -59,7 +59,9 @@ function Module_Dependencies.visit(node: Node, mod: Node, d: Dag)
|
||||||
|
|
||||||
local dependency = d.modules[type_name] or d.modules[utils.lowercase(type_name)]
|
local dependency = d.modules[type_name] or d.modules[utils.lowercase(type_name)]
|
||||||
if dependency then
|
if dependency then
|
||||||
mod.dependencies[dependency.name] = dependency.module_path
|
if dependency.name ~= mod.name then
|
||||||
|
mod.dependencies[dependency.name] = dependency.module_path
|
||||||
|
end
|
||||||
replace_in_node_type(node, dependency.module_path, dependency.name)
|
replace_in_node_type(node, dependency.module_path, dependency.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue