http://d.puremagic.com/issues/show_bug.cgi?id=2830


g...@nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |313, 314
            Summary|private attribute doesn't   |private attribute doesn't
                   |work for structs            |work for
                   |                            |structs/unions/classes




------- Comment #1 from g...@nwawudu.com  2009-04-10 09:59 -------
Structs, unions, classes and variables can bypass the private attribute.
Similar to BUG 313 and BUG 314, added dependancies.

tmp1.d
------
private struct TestStruct {
    int var;
}

private union TestUnion {
    int var;
}

private class TestClass {
    int var;
}

private int var;

tmp.d
-----
import tmp1;

void main() {
    TestStruct s;
    TestUnion u;
    auto c = new TestClass;
    s.var = var; // Fails
    s.var = a.var; // OK
}


-- 

Reply via email to