According to the spec, private module members are equivalent to
static
declarations in C programs. Why does this work (i.e. print 5)?
Both imported.d and sample.d are in same directory
(.../attributes).
Thanks
Dan
----------------------------------------------------------------------
import std.stdio;
import play.education.attributes.imported;
void main() {
WhyIsAccessible s;
writeln(s.x);
}
----------------------------------------------------------------------
module play.education.attributes.imported;
private:
struct WhyIsAccessible {
int x = 5;
}
----------------------------------------------------------------------