[Issue 8440] New: templated functions + template mixins give conflict

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 25 13:32:19 PDT 2012


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 at puremagic.com
        ReportedBy: ellery-newcomer at utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2012-07-25 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: -------


More information about the Digitalmars-d-bugs mailing list