[Issue 9020] New: This pointer is not the same in constructor as it is in methods
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 13 17:29:43 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9020
Summary: This pointer is not the same in constructor as it is
in methods
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: malteskarupke at web.de
--- Comment #0 from Malte Skarupke <malteskarupke at web.de> 2012-11-13 17:29:42 PST ---
Following test:
int main()
{
class C
{
this()
{
this_pointer = &this;
}
invariant()
{
assert(this_pointer == &this);
}
C * this_pointer;
}
C c = new C;
return 0;
}
That assert fires on DMD 2.060
--
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