Summary: Variadic constructors don't compile for classes
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from vano <> 2010-09-21 03:38:45 PDT 
This is an issue similar to earlier reported and fixed for *struct* (see

Using DMD v2.049 on Windows, the code for *struct* compiles whereas for *class*
does not. If there is only *variadic* parameter - everything works, but as soon
as other parameters are added before, the call to *ctor()* does not compile:

    struct S2 { // Good
        this(T...)(in string msg, T args) {

    class C1 { // Good
        this(T...)(T args) {

    class C2 { // Compiles, but ctor() fails
        this(T...)(in string msg, T args) {

    S2 s2 = S2(); // works
    auto c1 = new C1(); // works
    auto c2 = new C2("test"); // ERROR: does not compile with "Error: no
constructor for C2"

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to