[Issue 8228] New: Mixin template can't add constructor to class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 11 15:20:14 PDT 2012


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

           Summary: Mixin template can't add constructor to class
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-06-11 15:22:20 PDT ---
mixin template Root()
{
    this(int x) { }
    void test() { }
}

class Foo
{
    mixin Root;
    this()
    {
        test();   // OK
        this(1);  // FAIL
    }
}

void main() { }

It's ok to add virtual methods but not constructors. This has to be a bug..

-- 
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