https://d.puremagic.com/issues/show_bug.cgi?id=12191

           Summary: bad purity propagation for double-nested delegate
                    templates
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: thecybersha...@gmail.com


--- Comment #0 from Vladimir Panteleev <thecybersha...@gmail.com> 2014-02-18 
16:45:41 EET ---
void fun(H)(H h)
{
    enum parameter = "";
    alias T = typeof(h.a(parameter)); // If removed, alters error message
    static if (!is(typeof(h.a(parameter)) == void))
        fun(h.a(parameter));
}

struct S(alias d)
{
    alias a = d;
}

unittest
{
    int var;

    fun
    (
        S!
        (
            (string arg)
            {
                return S!
                (
                    (/* string */ arg) // uncomment type to fix error
                    { var++; }
                )();
            }
        )()
    );
}

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

Reply via email to