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

           Summary: [2.060 beta] static foreach over typesafe vararg
                    rejected
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            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> 2012-07-24 
15:49:52 PDT ---
void foo(T...)(T args)
{
    foreach(T arg; args)
    {}
}

void main()
{
    foo("", [""]);
}

Works in 2.059, but not in 2.060 beta:

testTypeSafeVarArg.d(1): Error: cannot implicitly convert expression (_param_0)
of type string to string[]
testTypeSafeVarArg.d(1): Error: cannot implicitly convert expression (_param_1)
of type string[] to string
testTypeSafeVarArg.d(9): Error: template instance
testTypeSafeVarArg.foo!(string,string[]) error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to