[Issue 6998] New: std.container.Array destroys class instances
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 23 16:40:54 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6998
Summary: std.container.Array destroys class instances
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: mailme+d at nilsb.dyndns.org
--- Comment #0 from Nils <mailme+d at nilsb.dyndns.org> 2011-11-23 16:40:00 PST ---
---
class C {
int i;
}
auto c = new C;
c.i = 42;
Array!C a;
a ~= c;
a.clear;
assert(c.i == 42); // fails
---
Tested with dmd 2.056.
Problem does not arise with structs.
--
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