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: nob...@puremagic.com
        ReportedBy: cbkbbej...@mailinator.com


--- Comment #0 from Nick Sabalausky <cbkbbej...@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: -------

Reply via email to