dmd 1.056 and 2.040 release
bearophile
bearophileHUGS at lycos.com
Sat Jan 30 05:09:50 PST 2010
Regarding this:
Bugzilla 3556: version(CTFE)
I have written the following little D2 program:
import std.stdio: printf;
static if (__ctfe) {
int foo() {
return 1;
}
} else {
int foo() {
return 2;
}
}
enum int x1 = foo();
void main() {
int x2 = foo();
printf("%d %d\n", x1, x2);
}
But it doesn't work, I don't understand why.
(Isn't the usage of __ctfe normally done at compile time? Otherwise this feature introduces another very special case in the language).
----------------
Can you tell me the purpose of the following 3 changes?
ModuleInfo changed from class to struct
added static/final function implementations to interfaces
http://dsource.org/projects/dmd/changeset/339
Thank you,
bye,
bearophile
More information about the Digitalmars-d-announce
mailing list