Skip to content

Commit

Permalink
fix Issue 14050 - dmd -v lists imports from failed __traits(compile…
Browse files Browse the repository at this point in the history
…s) blocks

Don't print verbose message if module load fails.
  • Loading branch information
9rnsr committed Jan 26, 2015
1 parent 6b86b12 commit 451a54b
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 451a54b

Please sign in to comment.