www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - assert fails to display file on dmd 2.040?

reply Lutger <lutger.blijdestijn gmail.com> writes:
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 l(5): Assertion failure
                                    ^ not the right file

// in file test.d:
assert(false, "ok");

output: core.exception.AssertError test.d(5): ok
Feb 02 2010
parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
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 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 test.d(5): ok

Yes, that used to work and apparently still does. Ali
Feb 02 2010