[Issue 7998] New: static assert message string printing problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 27 05:08:05 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7998
Summary: static assert message string printing problem
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-04-27 05:09:10 PDT ---
This code:
import std.conv: to;
void main() {
//static assert(false, "some message");
static assert(false, to!string(1) ~ " some message");
}
Shows (dmd 2.060alpha):
test.d(4): Error: static assert ['1',' ','s','o','m','e','
','m','e','s','s','a','g','e']
While uncommenting the first static assert gives a more correct printing of the
error message:
test2.d(3): Error: static assert "some message"
This problem has shown up in code like:
import std.array: uninitializedArray;
void main() {
auto a = uninitializedArray!(int)(1);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list