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

           Summary: Template mixin'd members do not properly overload
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: simen.kja...@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kja...@gmail.com> 2012-03-25 15:21:31 
PDT ---
mixin template A( ) {
    template C( int n : 0 ) {
        int C = 0;
    }
}

mixin template B( ) {
    template C( int n : 1 ) {
        int C = 1;
    }
}

class Foo {
    mixin A!( );
    mixin B!( );
}

void main( ) {
    assert( Foo.C!0 == 0 );
}

foo.d(19): Error: __overloadset isn't a template

Or (without the wrapping class):

foo.d(17): Error: template instance C!(0) ambiguous template declaration
foo.B!().C(int n : 1) and foo.A!().C(int n : 0)

The two versions of C here introduced could clearly coexist and be referred to
as Foo.C!0 and Foo.C!1.

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

Reply via email to