[Issue 8427] [2.060 beta] static foreach over typesafe vararg rejected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 24 16:08:59 PDT 2012


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


Simen Kjaeraas <simen.kjaras at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simen.kjaras at gmail.com


--- Comment #2 from Simen Kjaeraas <simen.kjaras at gmail.com> 2012-07-24 16:08:58 PDT ---
(In reply to comment #1)
> foreach(T arg; args) – sure about that T there?

As Nick stated in the report, it compiles under 2.059. However,

void foo(T...)(T args)
{
    foreach(T arg; args)
    {
        pragma(msg, typeof(arg));
        pragma(msg, T);
    }
}

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

Should prove that the T is being ignored in 2.059, and as such it accepts
invalid code. This is not a regression, it's a fix.

-- 
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