Unimplemented toConstElem is not a fatal error if errors are gagged.

Because ldc uses gagging to check whether an expression is constant.
This commit is contained in:
Alexey Prokhin
2011-11-01 14:35:24 +04:00
parent 22d0f00027
commit 6ef7ee6d32

View File

@@ -3022,7 +3022,8 @@ STUB(PowAssignExp);
#define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) { \
error("expression '%s' is not a constant", toChars()); \
fatal(); \
if (!global.gag) \
fatal(); \
return NULL; \
}
CONSTSTUB(Expression);