[Issue 7584] contract checking is too conservative for inherited contracts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 26 08:17:37 PST 2012


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



--- Comment #4 from timon.gehr at gmx.ch 2012-02-26 08:17:35 PST ---
LSP is not violated. That is the point. The rules proposed here are sufficient
to guarantee LSP. The rules that are currently employed are too conservative.
Think about it.

void main(){
    Foo foo = new Bar;
    foo.foo(0); // call ok, returns 0
    // foo.foo(1); // _call_ not ok, violates in contract
}

Also see issue 6857.

-- 
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