[Issue 1179] New: Compiler doesn't complain about function redefinition when using template mixin

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 23 05:29:59 PDT 2007


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

           Summary: Compiler doesn't complain about function redefinition
                    when using template mixin
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: aarti at interia.pl


import std.stdio;
template t(T) {
    int policy() { return 1; }
}
class C {
    mixin t!(C);
    int policy() { return 2; }
}

void main() {
    writefln((new C).policy);
}


-- 



More information about the Digitalmars-d-bugs mailing list