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

           Summary: struct initialization with empty variadic arguments
                    tries to call constructor
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: monarchdo...@gmail.com


--- Comment #0 from monarchdo...@gmail.com 2012-10-05 03:17:07 PDT ---
//----
struct S
{
    this(int);
}

void foo(T, Args...)(Args args)
{
    T t = T(args); Error: constructor main.S.this (int) is not callable using
argument types ()
}
void main()
{
    S t = S(); //OK, initialize to S.init
    foo!S();
}
//----
Basically, the compiler gets confused about "T(args)", and tries to call S's
constructor "this(int)".

Proper behavior would be to call "T()" and initialize to T.init

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

Reply via email to