initializing const(Date)
Dan
dbdavidson at yahoo.com
Tue Mar 19 09:35:20 PDT 2013
This used to work but now in 2.062 it causes ctfe error.
Any suggested workaround?
http://dpaste.dzfl.pl/f1a8c2f5
-------------------------------------
import std.datetime;
const(Date) DefaultDate = Date(1929, 10, 29);
void main() {
}
-------------------------------------
Compilation output:
/opt/compilers/dmd2/include/std/datetime.d(13542): Error:
Internal Compiler Error: CTFE literal cast(short)1
dmd: ctfeexpr.c:353: Expression* copyLiteral(Expression*):
Assertion `0' failed.
Thanks
Dan
More information about the Digitalmars-d-learn
mailing list