[Issue 5134] New: std.algorithm.startsWith won't accept var from "in" as first arg
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 29 23:58:44 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5134
Summary: std.algorithm.startsWith won't accept var from "in" as
first arg
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: cbkbbejeap at mailinator.com
--- Comment #0 from Nick Sabalausky <cbkbbejeap at mailinator.com> 2010-10-29 23:57:54 PDT ---
import std.algorithm;
void main()
{
foo("hello");
}
void foo(in string str)
{
startsWith(str, "a");
}
DMD 2.050 output:
testStartsWith.d(8): Error: template std.algorithm.startsWith(alias pred = "a
== b",Range,Ranges...) if (Ranges.length > 1 && isInputRange!(Range) &&
is(typeof(.startsWith!(pred)(doesThisStart,withOneOfThese[0])) : bool) &&
is(typeof(.startsWith!(pred)(doesThisStart,withOneOfThese[1..__dollar])) :
uint)) does not match any function template declaration
testStartsWith.d(8): Error: template std.algorithm.startsWith(alias pred = "a
== b",Range,Ranges...) if (Ranges.length > 1 && isInputRange!(Range) &&
is(typeof(.startsWith!(pred)(doesThisStart,withOneOfThese[0])) : bool) &&
is(typeof(.startsWith!(pred)(doesThisStart,withOneOfThese[1..__dollar])) :
uint)) cannot deduce template function from argument types
!()(const(immutable(char)[]),string)
Worked in DMD 2.049
--
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