[Issue 6856] Preconditions are not inherited
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 26 09:15:38 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6856
--- Comment #19 from Stewart Gordon <smjg at iname.com> 2012-02-26 09:15:32 PST ---
(In reply to comment #17)
> That assumption is bogus, because this is almost never the case.
> It makes contract programming basically unusable. Such a strong
> weakening of the 'in' contract should not be the default.
It depends on how you look at it. A function can, by default, accept
any arguments of the types specified. I think the view taken is that
the in contract supplements the parameter list, and the absence of an
in contract with a given parameter list denotes an absence of further
restrictions on what may be passed into the function.
> Don's proposal is to remove 'in' contract widening completely.
> That does not make a lot of sense to me.
Indeed, it does seem that Don doesn't like contravariance.
--
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