digitalmars.D.bugs - [Issue 7832] New: opAssign does not get used for function parameters with a default value
- d-bugmail puremagic.com (27/27) Apr 05 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7832
- d-bugmail puremagic.com (10/10) Apr 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7832
- d-bugmail puremagic.com (8/8) Apr 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7832
- d-bugmail puremagic.com (9/9) May 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7832
http://d.puremagic.com/issues/show_bug.cgi?id=7832 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 AssignedTo: nobody puremagic.com ReportedBy: nyphbl8d gmail.com --- Comment #0 from William Moore <nyphbl8d gmail.com> 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 so: void tfunc(test t = null) {} // nope nope nope nope This occurs in 2.058. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 05 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7832 --- Comment #1 from William Moore <nyphbl8d gmail.com> 2012-04-20 05:51:42 PDT --- It was late when I submitted this, so I wasn't thinking about what was actually going on here. The null assignment as a default parameter is treated as though it were passed as an argument which would require some way to cast implicitly.... So given that, this really becomes a feature request for implicit casting support. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7832 William Moore <nyphbl8d gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7832 William Moore <nyphbl8d gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 07 2012