[Issue 3332] New: Mixin a constructor with a construct already present fails

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 19 15:04:11 PDT 2009


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

           Summary: Mixin a constructor with a construct already present
                    fails
           Product: D
           Version: 1.047
          Platform: x86
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: doob at me.com


--- Comment #0 from Jacob Carlborg <doob at me.com> 2009-09-19 15:04:10 PDT ---
The following code doesn't compile:

template C ()
{
    this (int i)
    {

    }
}

class A
{
    mixin C;

    this ()
    {

    }
}

void main ()
{
    auto a = new A(3);
}

The errors are: 
"main.d(23): Error: constructor main.A.this() does not match parameter types
(int)
main.d(23): Error: expected 0 arguments, not 1"

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