D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6041 - std.algorithm.remove wrong code in assert
Summary: std.algorithm.remove wrong code in assert
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 18:28 UTC by Andrej Mitrovic
Modified: 2011-07-30 20:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2011-05-20 18:28:44 UTC
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 ]);
Comment 1 Jonathan M Davis 2011-07-30 20:49:15 UTC
This appears to have been fixed.