www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1686] New: mixin overload

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

           Summary: mixin overload
           Product: D
           Version: 1.023
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: benoit tionex.de


template M( T...){
    void opCall( T t ){ // line 6
    }
}
class C1 {
    mixin M!() m1;
    mixin M!( bool ) m2;
}

class C2a : C1{
    mixin M!( bool ) m3;  // compiles OK
}
class C2b : C1{
    mixin M!( int ) m3; // Compile error, see below (line 16)
}

t.d(6): Error: t.C1.M!().opCall at t.d(6) conflicts with t.C1.M!(bool).opCall
at t.d(6)
t.d(16): mixin t.C2.M!(int) error instantiating


-- 
Nov 22 2007