mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Fixed potential assertion failure in taking address of function as a constant expression.
This commit is contained in:
@@ -975,8 +975,8 @@ LLConstant* AddrExp::toConstElem(IRState* p)
|
||||
// static function
|
||||
else if (FuncDeclaration* fd = vexp->var->isFuncDeclaration())
|
||||
{
|
||||
DtoForceDeclareDsymbol(fd);
|
||||
IrFunction* irfunc = fd->ir.irFunc;
|
||||
assert(irfunc);
|
||||
return irfunc->func;
|
||||
}
|
||||
// something else
|
||||
|
||||
Reference in New Issue
Block a user