Fix error diagnosis for test fail91.

This commit is contained in:
Kai Nacke
2014-01-04 01:57:56 +01:00
parent acf1ed40b0
commit 27a9ede3fd
3 changed files with 12 additions and 2 deletions

View File

@@ -30,6 +30,11 @@
//////////////////////////////////////////////////////////////////////////////////////////
void DtoResolveStruct(StructDeclaration* sd)
{
DtoResolveStruct(sd, sd->loc);
}
void DtoResolveStruct(StructDeclaration* sd, Loc& callerLoc)
{
// Make sure to resolve each struct type exactly once.
if (sd->ir.resolved) return;
@@ -44,7 +49,7 @@ void DtoResolveStruct(StructDeclaration* sd)
// if it's a forward declaration, all bets are off. The type should be enough
if (sd->sizeok != SIZEOKdone)
{
error("struct %s.%s unknown size", sd->getModule()->toChars(), sd->toChars());
error(callerLoc, "struct %s.%s unknown size", sd->getModule()->toChars(), sd->toChars());
fatal();
}