[Issue 2926] New: bug in alias this with mutually recursive structs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 2 19:41:43 PDT 2009


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

           Summary: bug in alias this with mutually recursive structs
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: andrei at metalanguage.com


struct A(T)
{
    B!T fun()
    {
        return B!T.init;
    }
}

struct B(T)
{
    private A!T _s;
    alias _s this;
}

void main() {
    A!(int) s;
}

./test.d(15): Error: alias this there can be only one alias this
./test.d(6): Error: template instance test.B!(int) error instantiating
./test.d(15): Error: alias this there can be only one alias this


-- 



More information about the Digitalmars-d-bugs mailing list