[Issue 14865] Elide calling invariant for classes with no invariant defined

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Aug 4 05:06:08 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14865

--- Comment #3 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Dmitry Olshansky from comment #2)
> Could it do a test on invariant v-table slot to see if it's a default
> invariant?
> Then if it's the default - just test for null inline, if not - call that
> slot.

Yes, that's exactly what I meant. In fact, the language could put a null
pointer in that slot by default to make it easy. Although I don't understand
what you mean by the "test for null inline". If the object is null, there is no
vtable to check.

--


More information about the Digitalmars-d-bugs mailing list