[Issue 14865] Elide calling invariant for classes with no invariant defined
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 3 19:45:46 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14865
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
For virtual class methods, their invariant call should be virtual. For example:
class C
{
void foo() {}
}
class D : C
{
invariant {}
}
void main()
{
C c = new D;
c.foo(); // should check D.invariant
}
--
More information about the Digitalmars-d-bugs
mailing list