View mode: basic / threaded / horizontal-split · Log in · Help
February 02, 2010
assert fails to display file on dmd 2.040?
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
February 03, 2010
Re: assert fails to display file on dmd 2.040?
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
Top | Discussion index | About this forum | D home