--- Comment #35 from Walter Bright <> 2012-05-04 
13:41:50 PDT ---
(In reply to comment #34)
> But you could still argue that the call is in breach of A's API and therefore
> the code is incorrect.

Again, this is NOT true. The type of the argument is not statically A, it is a
polymorphic type A.

If an instance of A is passed, then the call to foo(-1) will fail. Please try
it and see for yourself. There is no hole in the system.

> To be correct, the in contract for would have to
> be something like
> in { assert(x > 0 || x == bar()); }
> But since enforcing this now is a potentially breaking change, I can now see a
> case for leaving the behvaiour as it is.

You are still seeing this as a bug in the OOP design. It is not. The design is
sound and correct.

If you still disagree, please write a code sample that asserts when it should
not, or passes when it must not, compile it and run it, and post it here.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to