[Issue 796] Asserting a null object reference throws AssertError Failure internal\invariant.d(14) or Access Violation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 7 04:20:52 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=796
--- Comment #8 from Stewart Gordon <smjg at iname.com> 2011-03-07 04:17:53 PST ---
(In reply to comment #7)
> Every time I write
>
> assert(object);
>
> A dagger pierces my heart and I remember I must write
>
> assert(object !is null);
>
> Could we get this fixed this decade some time?
Indeed. The intended behaviour (check that object is non-null AND satisfies
its invariants) needs to be built into the compiler, not delegated to the RTL.
--
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