1
Fork 0

resolve: Shadow erroneous glob imports with erroneous single imports

This commit is contained in:
Vadim Petrochenkov 2022-10-15 22:37:31 +04:00
parent b8c35ca26b
commit f767f2297d
2 changed files with 13 additions and 1 deletions

View file

@ -252,7 +252,7 @@ impl<'a> Resolver<'a> {
self.set_binding_parent_module(binding, module);
self.update_resolution(module, key, |this, resolution| {
if let Some(old_binding) = resolution.binding {
if res == Res::Err {
if res == Res::Err && old_binding.res() != Res::Err {
// Do not override real bindings with `Res::Err`s from error recovery.
return Ok(());
}