www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12036] New: Wrong code with auto-returning function as mixin alias param

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

           Summary: Wrong code with auto-returning function as mixin alias
                    param
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow gmail.com> 2014-01-30
06:49:53 EET ---
template T(alias a)
{
    string value;
}

struct S
{
    auto fun() { }
    mixin T!fun;
}

void main()
{
    S s;
    assert(s.value == "");
}

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