Thread overview | ||||||
---|---|---|---|---|---|---|
|
November 05, 2009 [Issue 3475] New: .dup does not call this(this) for elements | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3475 Summary: .dup does not call this(this) for elements Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrei@metalanguage.com --- Comment #0 from Andrei Alexandrescu <andrei@metalanguage.com> 2009-11-05 10:50:17 PST --- struct Widget { private int[] array; this(uint length) { array = new int[length]; } this(this) { array = array.dup; } } void main() { auto a = new Widget[1]; a[0] = Widget(10); auto b = a.dup; assert(b[0].array !is a[0].array); } The code fails. It should pass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 28, 2011 [Issue 3475] .dup does not call this(this) for elements | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=3475 --- Comment #1 from Don <clugdbug@yahoo.com.au> 2011-02-28 14:03:02 PST --- Bug 4632 is probably a duplicate. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 09, 2011 [Issue 3475] .dup does not call this(this) for elements | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=3475 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies@gmail.com Resolution| |FIXED --- Comment #2 from yebblies <yebblies@gmail.com> 2011-07-09 12:26:00 EST --- This works on current dmd (2.053) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 09, 2011 [Issue 3475] .dup does not call this(this) for elements | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=3475 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsinfu@gmail.com --- Comment #3 from yebblies <yebblies@gmail.com> 2011-07-09 12:26:11 EST --- *** Issue 4632 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation