[Issue 519] Invariant not called from autogenerated constructor
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 20 05:49:51 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=519
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |k.hara.pg at gmail.com
--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> 2011-06-20 05:45:02 PDT ---
Autogenerated destructor has same problem:
----
import core.stdc.stdio : printf;
class Foo {
invariant() {
printf("Foo.invariant\n");
}
}
void main() {
Foo foo = new Foo();
printf("lifetime of foo\n");
delete foo;
}
----
Should print:
----
Foo.invariant
lifetime of foo
Foo.invariant
----
But current output is:
----
lifetime of foo
----
--
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