Handle explicit builtin imports with empty exposing lists

Also includes related style suggestions by Ayaz on #6658
This commit is contained in:
Agus Zubiaga 2024-04-22 18:29:48 -03:00
parent 66bf955a6e
commit d952d5576a
No known key found for this signature in database
3 changed files with 92 additions and 59 deletions

View file

@ -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