[Issue 2816] New: Sudden-death static assert is not very useful
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 7 01:29:16 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2816
Summary: Sudden-death static assert is not very useful
Product: D
Version: 1.042
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: patch
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: clugdbug at yahoo.com.au
Sudden-death static asserts were introduced due to comment #2 of bugzilla 77:
http://d.puremagic.com/issues/show_bug.cgi?id=77
However, they make static assert rather useless, since it gives you absolutely
no context. To make it useful again,
In staticassert.c, line 68 (in DMD2.027):
error("is false");
if (!global.gag)
fatal();
---
change this to:
error("(%s) is false", exp->toChars());
---
(ie, remove the global.gag test).
--
More information about the Digitalmars-d-bugs
mailing list