www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8440] New: templated functions + template mixins give conflict

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

           Summary: templated functions + template mixins give conflict
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: ellery-newcomer utulsa.edu



13:32:17 PDT ---
possibly related to issue 7553.

code:

mixin template T(int i) {
    auto j(string s="a", U)(U u1, U u2) {
        return 0;
    }
    auto j(int i,string s="a", W)(W u1, W u2) {
        return i;
    }
}

class X {
    mixin T!(1) t1;
    mixin T!(2) t2;
}
void main (){
    X x = new X();
    x.t1.j!(3,"a")(2.2, 3.3);
}


fireworks:
tok.d(16): Error: tok.X.T!(2).j!("a",double).j at tok.d(2) conflicts with
tok.X.T!(1).j!("a",double).j at tok.d(2)

since I am disambiguating j with the mixin alias, this should not happen.

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