Skip to content

Commit

Permalink
Merge pull request #4346 from 9rnsr/fix14050
Browse files Browse the repository at this point in the history
fix Issue 14050 - `dmd -v` lists imports from failed __traits(compiles) blocks
  • Loading branch information
andralex committed Jan 26, 2015
2 parents 3208762 + 451a54b commit 8a04bc4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/module.c
Expand Up @@ -228,6 +228,9 @@ Module *Module::load(Loc loc, Identifiers *packages, Identifier *ident)
if (result)
m->srcfile = new File(result);

if (!m->read(loc))
return NULL;

if (global.params.verbose)
{
fprintf(global.stdmsg, "import ");
Expand All @@ -242,9 +245,6 @@ Module *Module::load(Loc loc, Identifiers *packages, Identifier *ident)
fprintf(global.stdmsg, "%s\t(%s)\n", ident->toChars(), m->srcfile->toChars());
}

if (!m->read(loc))
return NULL;

m->parse();

Target::loadModule(m);
Expand Down Expand Up @@ -277,7 +277,8 @@ bool Module::read(Loc loc)
}

if (!global.gag)
{ /* Print path
{
/* Print path
*/
if (global.path)
{
Expand Down

0 comments on commit 8a04bc4

Please sign in to comment.