From 6ef7ee6d326624b28dd6a2752db2067e0cc2e330 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Tue, 1 Nov 2011 14:35:24 +0400 Subject: [PATCH] Unimplemented toConstElem is not a fatal error if errors are gagged. Because ldc uses gagging to check whether an expression is constant. --- gen/toir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index 1958ef8b..b4226d07 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -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);