What    |Removed                     |Added
           Keywords|                            |patch
            Version|2.015                       |1.031

------- Comment #2 from  2009-04-02 14:15 -------

The segfault is caused by this line in DotIdExp::semantic(Scope *sc)
 in expression.c, line 5348 (in DMD 2.027).

    Type *t1b = e1->type->toBasetype();

If the expression was invalid, e1->type is null, so it segfaults.

Adding a line like:

if (!e1->type) {error("invalid expression"); return e1;}

before line 5348 is sufficient to avoid the segfault, and the original valid
code will compile without error. Not sure what the error message should be,


Reply via email to