www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14610] New: 'null this' assertion missing in 2.067


          Issue ID: 14610
           Summary: 'null this' assertion missing in 2.067
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: tomerfiliba gmail.com

Consider the following code:

struct S {
    void foo() {}

void main() {
    S* s = null;

It used to crash with "null this", e.g., 

core.exception.AssertError main.d(2): null this

but as of 2.067 it crashes with 

core.exception.AssertError source/main.d(0): Assertion failure

So first of all, the message is undescriptive, and second, the line number is
0, which is very weird.

May 19 2015