[Issue 1276] New: static assert message displayed with escaped characters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 18 09:11:54 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1276
Summary: static assert message displayed with escaped characters
Product: D
Version: 1.015
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: smjg at iname.com
If I try to make a static assert message span multiple lines, it doesn't work.
This is because it tries to display it as a string in code, and in the process
turns certain characters into their escape sequences.
----------
static assert (false,
"An error message
\tthat spans multiple lines, and also contains such characters as a tab,
\\ and \".");
----------
static_assert_linebreaks.d(1): static assert "An error message\x0a\x09that
spans multiple lines, and also contains such characters as a tab,\x0a\\' and
\"."
----------
Since the purpose of this is to display a message while running the compiler,
it should just display the string, rather than a code representation of it.
That is, the compiler output should look something like this:
static_assert_linebreaks.d(1): static assert is false: An error message
that spans multiple lines, and also contains such characters as a tab,
\ and ".
--
More information about the Digitalmars-d-bugs
mailing list