Make an unresolved global into an error instead of an assert.

Fixes nocompile/alias_28_A/F.
This commit is contained in:
Christian Kamm
2008-07-26 15:23:15 +02:00
parent b496d03606
commit 0c9674e952

View File

@@ -244,9 +244,9 @@ DValue* VarExp::toElem(IRState* p)
DtoConstInitGlobal(vd);
}
if (!vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) {
Logger::println("global variable not resolved :/ %s", vd->toChars());
Logger::cout() << *DtoType(vd->type) << '\n';
assert(0);
error("global variable %s not resolved", vd->toChars());
Logger::cout() << "unresolved global had type: " << *DtoType(vd->type) << '\n';
fatal();
}
return new DVarValue(vd, vd->ir.getIrValue(), true);
}