fixes #431 :: apply DMDFE 1.062; thanks SiegeLord

This commit is contained in:
Moritz Warning
2010-09-27 00:06:28 +02:00
parent b032e3d1f7
commit c4e255206a
35 changed files with 918 additions and 335 deletions

View File

@@ -672,9 +672,16 @@ void Module::parse()
Dsymbol *prev = dst->lookup(ident);
assert(prev);
Module *mprev = prev->isModule();
assert(mprev);
error(loc, "from file %s conflicts with another module %s from file %s",
srcname, mprev->toChars(), mprev->srcfile->toChars());
if (mprev)
error(loc, "from file %s conflicts with another module %s from file %s",
srcname, mprev->toChars(), mprev->srcfile->toChars());
else
{
Package *pkg = prev->isPackage();
assert(pkg);
error(loc, "from file %s conflicts with package name %s",
srcname, pkg->toChars());
}
}
else
{