[Issue 9600] New: Inner class is not finalized on parent class finalization
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 27 01:40:37 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9600
Summary: Inner class is not finalized on parent class
finalization
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: wrong-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-02-27 12:40:35 MSK ---
---
extern (C) void rt_finalize2(void* p, bool det = true, bool resetMemory =
true);
class A
{
class B
{
int n;
~this() { n = 7; }
}
}
void main()
{
A a = new A;
A.B b = a.new B;
rt_finalize2(cast(void*) a);
assert(b.n == 7); // fails
}
---
I see no reasons for such "orphan" class to be "alive" as we even doesn't have
"isFinalized" function for object checking to be finalized.
--
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