mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 05:43:14 +01:00
Make an unresolved global into an error instead of an assert.
Fixes nocompile/alias_28_A/F.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user