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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 7 17:05:42 PDT 2010


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



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-08-07 17:05:41 PDT ---
And an additional example:

class A { int x; }

unittest {
    A a;
    assert(__traits(compiles, a.x = 5));
}

void main() { }

Compiles and runs succesfully. assert should fail.

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