[Issue 14334] New: Forward reference error with method returning template instance equal to typeof(this)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 25 04:23:52 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14334

          Issue ID: 14334
           Summary: Forward reference error with method returning template
                    instance equal to typeof(this)
           Product: D
           Version: D1 & D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: andrej.mitrovich at gmail.com

-----
struct S ( T )
{
    SInt get()
    {
        return SInt();
    }
}

alias S!(int) SInt;

void main()
{
}
-----

$ dmd test.d
> Error: alias test.SInt recursive alias declaration

--


More information about the Digitalmars-d-bugs mailing list