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: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@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: -------

Reply via email to