mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
fix unused import bug
This commit is contained in:
parent
27cdcffec0
commit
2e8499f92c
3 changed files with 23 additions and 15 deletions
|
@ -149,14 +149,13 @@ pub fn canonicalize_module_defs<'a>(
|
|||
}
|
||||
|
||||
// Gather up all the symbols that were referenced from other modules.
|
||||
for symbol in env.referenced_symbols.iter() {
|
||||
for symbol in env.qualified_lookups.iter() {
|
||||
references.insert(*symbol);
|
||||
}
|
||||
|
||||
// Add defs for any referenced builtins.
|
||||
for (symbol, def) in builtin_defs(var_store) {
|
||||
if output.references.lookups.contains(&symbol) || output.references.calls.contains(&symbol)
|
||||
{
|
||||
if references.contains(&symbol) {
|
||||
defs.can_defs_by_symbol.insert(symbol, def);
|
||||
}
|
||||
}
|
||||
|
@ -250,6 +249,11 @@ pub fn canonicalize_module_defs<'a>(
|
|||
references.insert(symbol);
|
||||
}
|
||||
|
||||
// Gather up all the symbols that were referenced from other modules.
|
||||
for symbol in env.qualified_lookups.iter() {
|
||||
references.insert(*symbol);
|
||||
}
|
||||
|
||||
Ok(ModuleOutput {
|
||||
aliases,
|
||||
rigid_variables,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue