assert fails to display file on dmd 2.040?

Ali Çehreli acehreli at yahoo.com
Tue Feb 2 16:44:10 PST 2010


Lutger wrote:
> Does anybody get this with 2.040? I couldn't find a bug report about it, 
> so maybe it is due to my setup.
> 
> // in file test.d:
> assert(false);
> 
> output: core.exception.AssertError at l(5): Assertion failure
>                                    ^ not the right file

There has been a bug with that version of assert.

With recent versions of dmd, it used to print only the module name 
(without ".d"). Now it seems to be broken in a different way. :)

> 
> // in file test.d:
> assert(false, "ok");
> 
> output: core.exception.AssertError at test.d(5): ok

Yes, that used to work and apparently still does.

Ali



More information about the Digitalmars-d-learn mailing list