diff options
Diffstat (limited to 'gcc/d')
-rw-r--r-- | gcc/d/dmd/MERGE | 2 | ||||
-rw-r--r-- | gcc/d/dmd/statementsem.c | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 865462d..36f9aa9 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -d912f4e495412b67f0a2e3b07f645909cfee0212 +b0cd591770fefb4db6eaba89b7a548ef1e980f5c The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/statementsem.c b/gcc/d/dmd/statementsem.c index ccf141e..0dc5e77 100644 --- a/gcc/d/dmd/statementsem.c +++ b/gcc/d/dmd/statementsem.c @@ -3492,12 +3492,18 @@ public: } s->semantic(sc); - Module::addDeferredSemantic2(s); // Bugzilla 14666 - sc->insert(s); - - for (size_t j = 0; j < s->aliasdecls.dim; j++) + // https://issues.dlang.org/show_bug.cgi?id=19942 + // If the module that's being imported doesn't exist, don't add it to the symbol table + // for the current scope. + if (s->mod != NULL) { - sc->insert(s->aliasdecls[j]); + Module::addDeferredSemantic2(s); // Bugzilla 14666 + sc->insert(s); + + for (size_t j = 0; j < s->aliasdecls.dim; j++) + { + sc->insert(s->aliasdecls[j]); + } } } result = imps; |