[Issue 12451] New: Simple range mistake not caught by compiler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 24 05:32:41 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12451

           Summary: Simple range mistake not caught by compiler
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2014-03-24 05:32:39 PDT ---
This code compiles:

void main() {
    import std.algorithm: map, sum;
    int[][][] mat;
    mat.map!(map!sum);
}



While this is wrong code:


void main() {
    import std.algorithm: map, sum;
    int[][] mat;
    mat.map!(map!sum);
}



But the mistake is caught by the linker instead of the dmd, dmd 2.066alpha:

OPTLINK (R) for Win32  Release 8.00.15
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
test.obj(test) 
 Error 42: Symbol Undefined _D3std9algorithm38__T9MapResultS18€
sumTAiZ€Š£6__ctorMFNaNbNcNf€ƒžS€ÀÕ

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list