This ''should'' fix #139 , I failed to produce a testcase, but I would imagine this to be correct, and it removes '''that''' error when building Hybrid.

This commit is contained in:
Tomas Lindquist Olsen
2008-12-09 03:01:19 +01:00
parent a2bf0796ce
commit 417aa57501

View File

@@ -224,6 +224,13 @@ LLConstant* VarExp::toConstElem(IRState* p)
m = llvm::ConstantExpr::getBitCast(m, vartype);
return m;
}
else if (VarDeclaration* vd = var->isVarDeclaration())
{
// return the initializer
assert(vd->init);
return DtoConstInitializer(loc, type, vd->init);
}
// fail
assert(0 && "Unsupported const VarExp kind");
return NULL;
}