mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Handle explicit builtin imports with empty exposing lists
Also includes related style suggestions by Ayaz on #6658
This commit is contained in:
parent
66bf955a6e
commit
d952d5576a
3 changed files with 92 additions and 59 deletions
|
@ -115,6 +115,15 @@ impl Symbol {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn is_automatically_imported(self) -> bool {
|
||||
let module_id = self.module_id();
|
||||
|
||||
module_id.is_automatically_imported()
|
||||
&& Self::builtin_types_in_scope(module_id)
|
||||
.iter()
|
||||
.any(|(_, (s, _))| *s == self)
|
||||
}
|
||||
|
||||
pub fn module_string<'a>(&self, interns: &'a Interns) -> &'a ModuleName {
|
||||
interns
|
||||
.module_ids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue