Merge pull request #89 from kubouch/hide-import-patterns

Add import patterns to 'hide'
This commit is contained in:
JT
2021-10-05 10:44:13 +13:00
committed by GitHub
3 changed files with 132 additions and 7 deletions

View File

@ -375,7 +375,7 @@ impl<'a> StateWorkingSet<'a> {
if let Some(decl_id) = scope.decls.get(name) {
if !hiding.contains(decl_id) {
// Do not hide already hidden decl
// Hide decl only if it's not already hidden
last_scope_frame.hiding.insert(*decl_id);
return Some(*decl_id);
}
@ -409,8 +409,6 @@ impl<'a> StateWorkingSet<'a> {
}
pub fn activate_overlay(&mut self, overlay: Vec<(Vec<u8>, DeclId)>) {
// TODO: This will overwrite all existing definitions in a scope. When we add deactivate,
// we need to re-think how make it recoverable.
let scope_frame = self
.delta
.scope