[Issue 4109] New: writeln doesn't work with empty static array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 21 13:48:34 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4109

           Summary: writeln doesn't work with empty static array
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-04-21 13:48:33 PDT ---
This D2 code:

import std.stdio: writeln;
void main() {
    int[0] a;
    writeln(a);
}


dmd 2.043 shows:

[...]\dmd\src\phobos\std\format.d(2040): Error: array index 0 is out of bounds
obj[0 .. 0]
[...]\dmd\src\phobos\std\format.d(2040): Error: array index 0 is out of bounds
[0..0]

-- 
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