Strage class' with invariant() {} function behaviour

mumba qniol at
Wed Oct 8 12:31:57 PDT 2008

Jarrett Billingsley Wrote:

>  My guess is that D is inserting an implicit
> "out(result) { assert(this); }" on each public method, but the out
> contract probably hasn't yet been updated and thinks typeof(result) is
> just Object, not invariant(Object).  Hence, error.

Sorry, but I don't understand this sentence :). What do you mean by "updated"? "assert(this) added"? I guess not, since this is what D is actually doing (beginning of the sentence) so how we can even expect having sth done before we did it? Is there some kind of "update" D performs in order to turn types to invariant(types)?

More information about the Digitalmars-d-learn mailing list