|Posted by Michel Fortin||PermalinkReply|
For some reason this creates an access violation:
Apparently it's by design. This expression is calling o's invariant, it does not check for null as I'd expect. But o is null so calling invariant just crashes.
According to an old bug report, things have been working like this for a long time.
It works according to spec:
I wonder how many time I wrote the above assertion thinking I was just checking for null...