[Issue 6083] New: There can be only one alias this.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 31 15:30:58 PDT 2011


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

           Summary: There can be only one alias this.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2011-05-31 15:26:34 PDT ---
>From TDPL, page 231:

"A class could introduce any number of alias this declarations, thus subtyping
any number of types."

Let's test this:

class A{}
class B{}
class C{
    A a;
    B b;
    alias a this;
    alias b this;
}

Error: alias this there can be only one alias this

(I think that error message has a very nice humorous touch!)

The same applies to structs.

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


More information about the Digitalmars-d-bugs mailing list