Robert Clipsham schrieb:
dsimcha wrote:
struct Foo {
private uint bar;
}
void main() {
Foo foo;
foo.bar++; // error
(cast(public) foo.bar)++; // Works.
}
----
struct Foo {
private uint bar;
}
void main() {
Foo foo;
foo.bar++; // This works for me with dmd 1.026,
// dmd 2.031 and ldc r1411
// foo.bar is now 1.
}
----
Same effect for classes... Am I missing something or is this a bug?
Protection attributes will be ignored inside of the same module. This is
by design to have an alternative for C++ friend declarations.