Comment #0 by bearophile_hugs — 2010-09-01T12:11:48Z
This compiles with no errors with DMD 2.048, but I think it's a bug, because args.length is a value known only at a run-time, while enum is for values known at compile-time:
void main(string[] args) {
enum int n = args.length;
}
Comment #1 by clugdbug — 2010-09-01T12:22:25Z
It's definitely a bug. Have a look at bug 2414 for a more humorous example.
Comment #2 by nfxjfg — 2010-09-01T12:29:08Z
Possibly related to bug 4397?
Comment #3 by bearophile_hugs — 2011-06-26T05:25:12Z