[Issue 6041] New: std.algorithm.remove wrong code in assert

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 20 18:32:55 PDT 2011


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

           Summary: std.algorithm.remove wrong code in assert
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-05-20 18:28:44 PDT ---
int[] a = [ 1, 2, 3, 2, 3, 4, 5, 2, 5, 6 ]; 
assert(a[0 .. $ - remove!("a == 2")(a).length] == [ 1, 3, 3, 4, 5, 5, 6 ]); 

Last line should be:
assert(a[0 .. remove!("a == 2")(a).length] == [ 1, 3, 3, 4, 5, 5, 6 ]);

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