http://d.puremagic.com/issues/show_bug.cgi?id=6857



--- Comment #15 from Walter Bright <bugzi...@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: -------

Reply via email to