[Issue 4595] Accessing non-static member of a null reference compiles

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 8 09:16:59 PDT 2010


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



--- Comment #9 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-08-08 09:16:57 PDT ---
This is not a feature request. The TDPL specifically states that in *simple*
cases such as these, DMD should flag this as an error. Otherwise if it can't
figure out if it indeed is a null-reference, it will compile and let the user
handle it.

I usually compile with all warnings on. Thanks for the -O trick, bearophile. I
never thought adding optimizations can catch bugs like that. :)

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