[Issue 6857] Precondition contract checks should be statically bound.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 3 11:06:16 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6857
--- Comment #15 from Walter Bright <bugzilla at digitalmars.com> 2012-05-03 11:07:27 PDT ---
fizbuzzA(A a) {
a.foo(); // A.foo's in contract is valid
}
If an instance of B is passed to fizbuzzA, then the a.foo() will call B.foo(),
and either A.foo's in contract or B.foo's in contract must be valid.
There is no error or invalid corner case here.
I suspect that you think the contracts are checked based on static typing -
they are not, they are done using the virtual type.
--
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