mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
Actually set symbols_from_requires
This commit is contained in:
parent
cbc095aa1e
commit
141010e6c7
1 changed files with 9 additions and 4 deletions
|
@ -4123,6 +4123,7 @@ fn build_header<'a>(
|
||||||
HashMap::with_capacity_and_hasher(scope_size, default_hasher());
|
HashMap::with_capacity_and_hasher(scope_size, default_hasher());
|
||||||
let home: ModuleId;
|
let home: ModuleId;
|
||||||
let name: PQModuleName;
|
let name: PQModuleName;
|
||||||
|
let symbols_from_requires;
|
||||||
|
|
||||||
let ident_ids = {
|
let ident_ids = {
|
||||||
// Lock just long enough to perform the minimal operations necessary.
|
// Lock just long enough to perform the minimal operations necessary.
|
||||||
|
@ -4188,7 +4189,7 @@ fn build_header<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let HeaderType::Platform {
|
symbols_from_requires = if let HeaderType::Platform {
|
||||||
requires,
|
requires,
|
||||||
requires_types,
|
requires_types,
|
||||||
opt_app_module_id,
|
opt_app_module_id,
|
||||||
|
@ -4209,7 +4210,7 @@ fn build_header<'a>(
|
||||||
for Loc {
|
for Loc {
|
||||||
value: entry,
|
value: entry,
|
||||||
region: _,
|
region: _,
|
||||||
} in requires.iter()
|
} in requires
|
||||||
{
|
{
|
||||||
let ident: Ident = entry.ident.value.into();
|
let ident: Ident = entry.ident.value.into();
|
||||||
let ident_id = ident_ids.get_or_insert(entry.ident.value);
|
let ident_id = ident_ids.get_or_insert(entry.ident.value);
|
||||||
|
@ -4232,7 +4233,11 @@ fn build_header<'a>(
|
||||||
debug_assert!(!scope.contains_key(&ident));
|
debug_assert!(!scope.contains_key(&ident));
|
||||||
scope.insert(ident, (symbol, entry.region));
|
scope.insert(ident, (symbol, entry.region));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
symbols_from_requires
|
||||||
|
} else {
|
||||||
|
Vec::new()
|
||||||
|
};
|
||||||
|
|
||||||
let ident_ids = ident_ids_by_module.get_mut(&home).unwrap();
|
let ident_ids = ident_ids_by_module.get_mut(&home).unwrap();
|
||||||
|
|
||||||
|
@ -4335,7 +4340,7 @@ fn build_header<'a>(
|
||||||
exposes: exposed,
|
exposes: exposed,
|
||||||
parse_state,
|
parse_state,
|
||||||
exposed_imports: scope,
|
exposed_imports: scope,
|
||||||
symbols_from_requires: Vec::new(),
|
symbols_from_requires,
|
||||||
header_type,
|
header_type,
|
||||||
module_timing,
|
module_timing,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue