Summary: opAssign does not get used for function parameters
                    with a default value
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from William Moore <> 2012-04-05 15:35:30 PDT 
So if I define an opAssign for a struct with void* as the parameter like so:

struct test {void opAssign(void*mynull) {}}

It works great when used in a normal assignment like so:

void main () {
        test t = null; // compiles just fine

but refuses to compile for function parameters with default values of null like

void tfunc(test t = null) {} // nope nope nope nope

This occurs in 2.058.

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

Reply via email to