[Issue 5223] [qtd] Cannot use default value with function parameter of struct type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 16 09:49:21 PST 2010


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



--- Comment #1 from Max Samukha <samukha at voliacable.com> 2010-11-16 09:48:10 PST ---
Even simpler test-case:

struct S
{
    this(int x)
    {
    }

    void foo(S s = S(42))
    {
    }
}

void main()
{
    S s;
    s.foo(); // error
}

Error: more initializers than fields of S

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