www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6980] New: Disallow shadowing template parameters

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

           Summary: Disallow shadowing template parameters
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kyfolee gmail.com



This example compiles in 2.056

---
struct A(T)
{
    T func(T)(T rhs)
    {
        return rhs;
    }
}

void main()
{
    A!(int) a;

    a.func("test");
}
---

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