Version bug?
Adam Ruppe
destructionator at gmail.com
Fri Aug 20 16:49:38 PDT 2010
I just hit something that might be a compiler bug, or might be a
documentation bug. (Of course, it can't be me! :P )
I have two modules:
config.d
===
version (clientA) {}
version ( clientB ) {
version = withFeatureX;
}
version (clientC) {
version = withFeatureX;
}
===
application.d
===
import config;
void main() {
version(withFeatureX)
static assert(0);
}
====
dmd application.d config.d -version=clientB
This compiles, but I expect it to hit the static assert.
Should it? Note that it does work correctly if I put the version= line
in the actual file, but that means I can't have the nice centralized
config module anymore.
So is this a bug, or should the documentation be a bit more explicit
about version = lines only working inside the one module? (or should I
just learn how to read? :-P)
I kinda miss #include here.....
More information about the Digitalmars-d
mailing list