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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 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: -------