[Issue 6329] New: Out of range exceptions not thrown in certain cases

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 15 16:49:12 PDT 2011


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

           Summary: Out of range exceptions not thrown in certain cases
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-07-15 16:43:59 PDT ---
import std.stdio;
import std.file;

void main()
{
    foreach (string entry; dirEntries(".", SpanMode.shallow))
    {
        writeln(entry[0..1000]);  // out of range
    }
}

DMD 2.053:
D:\>dmd test.d && test.exe
core.exception.RangeError at test(8): Range violation

DMD 2.054:
D:\>dmd test.d && test.exe
D:\>

Wheres the range error??

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