mirror of
https://github.com/dlang/dmd.git
synced 2025-04-28 22:20:37 +03:00
fix Issue 18528 - dmd should deduplicate identical errors (#15312)
This commit is contained in:
parent
a88e1335f7
commit
ae23672059
2 changed files with 5 additions and 1 deletions
|
@ -1459,9 +1459,12 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
|
||||||
if (sym)
|
if (sym)
|
||||||
{
|
{
|
||||||
import dmd.access : symbolIsVisible;
|
import dmd.access : symbolIsVisible;
|
||||||
if (!symbolIsVisible(sc, sym))
|
if (!symbolIsVisible(sc, sym) && !sym.errors)
|
||||||
|
{
|
||||||
imp.mod.error(imp.loc, "member `%s` is not visible from module `%s`",
|
imp.mod.error(imp.loc, "member `%s` is not visible from module `%s`",
|
||||||
imp.names[i].toChars(), sc._module.toChars());
|
imp.names[i].toChars(), sc._module.toChars());
|
||||||
|
sym.errors = true;
|
||||||
|
}
|
||||||
ad.dsymbolSemantic(sc);
|
ad.dsymbolSemantic(sc);
|
||||||
// If the import declaration is in non-root module,
|
// If the import declaration is in non-root module,
|
||||||
// analysis of the aliased symbol is deferred.
|
// analysis of the aliased symbol is deferred.
|
||||||
|
|
|
@ -14,5 +14,6 @@ int func()
|
||||||
{
|
{
|
||||||
thebar +=1;
|
thebar +=1;
|
||||||
packagebar += 1;
|
packagebar += 1;
|
||||||
|
thebar +=1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue