www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - missing ".d" in assertion error message

/* Just played with D 1.0 and stumbled over this, is it a bug? */

module atest;

import std.stdio;

void main()
{
	version(a) {
		assert(0, "some message");
		// gives: Error: AssertError Failure atest.d(8) some message
	}
	else {
		version(b) {
			writefln("                                ,- missing \".d\"");
			// gives: Error: AssertError Failure atest(15) 
			assert(0);
		}
		else {
			writef(help);
		}
	}
}

char[] help = "Run with:

    dmd.exe -version=a -run atest.d
    dmd.exe -version=b -run atest.d
";
Jan 04 2007