[Issue 6490] New: countUntil will take a non-range for its second argument
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 14 03:33:17 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6490
Summary: countUntil will take a non-range for its second
argument
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: jmdavisProg at gmx.com
--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-08-14 03:33:15 PDT ---
This code compiles:
import std.algorithm;
void main()
{
string str = "abc123";
auto i = countUntil!((a, b){return (a >= '0' && a <= '9') || a == '.';})
(str, 0);
}
It shouldn't. Notice that the second argument to countUntil is 0, which is an
int, not a range.
--
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