Comment #0 by yuri.musashi.miwa.tamura — 2013-12-12T07:07:04Z
// module1.d
private enum X = 1;
// main1.d
import module1;
void main() {
int i = X;
}
// module2.d
private enum { X = 1 }
// main2.d
import module2;
void main() {
int i = X;
}
> dmd main1
main1.d(4): Error: module main1 module1.X is private
> dmd main2
(no error)
Is it a correct behavior?
Comment #1 by cauterite — 2014-10-16T09:33:30Z
(In reply to Musashi Tamura from comment #0)
> Is it a correct behaviour?
Nope, definitely not, and it seems this issue is still present in DMD v2.066.0
Quite an unusual bug. It might be related to issue #10528
Comment #2 by razvan.nitu1305 — 2018-01-25T11:47:34Z
The code now errors. Closing as fixed.
Comment #3 by razvan.nitu1305 — 2018-01-25T11:47:54Z