[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 10 04:07:41 PDT 2011


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



--- Comment #5 from Michel Fortin <michel.fortin at michelf.com> 2011-07-10 07:02:27 EDT ---
> Simple, yes.  But is it correct?

It's a fix for the issue at hand. It doesn't fix other issues related to
contracts, but it doesn't degrade things either. If you want to fix all the
issues in one step though, I'm not stopping you.

> Why would it be an Error?

Because in general contract violations are errors. There's indeed a special
case for contracts of overriding functions, but does that justify creating a
new error type just for that case? I think it's more consistent if all
contracts throw ContractErrors than if some contracts throw ContractExceptions
and some other throw AssertErrors.

> Regardless of the correct fix, is this a blocker for you?

It's not a blocker: I made the problematic function @trusted for now.

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