[Issue 2830] private attribute doesn't work for structs/unions/classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 8 14:52:53 PDT 2011


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com
            Version|1.043                       |D1 & D2


--- Comment #7 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-05-08 14:48:51 PDT ---
This is a bug in both D1 and D2, so I'm marking it as such. TestStruct
shouldn't even be constructable outside of tmp1.d. The question of allowing you
to access its member variables is secondary. It looks like the struct itself is
being left as public, when it should be private. Now, it's still a bug if you
can access its private member variables, but you shouldn't even be able to
construct it in the first place.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list