← Back to index
|
Original Bugzilla link
Bug 2225 – accessing private declaration allowed
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2008-07-13T22:00:56Z
Last change time
2019-07-13T09:56:28Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
david
Blocks
3108
Comments
Comment #0
by davidl — 2008-07-13T22:00:56Z
a.d module a; import b; int bar() { Outer o = new Outer; o.a = 3; Outer.Inner oi = o.new Inner; return oi.foo(); // returns 3 } b.d module b; class Outer { int a; private: class Inner { int foo() { return a; } } }
Comment #1
by pro.mathias.lang — 2019-07-13T09:56:28Z
This has been fixed with all the visibility fixes. Nowadays this yields: > foo.d(6): Deprecation: b.Outer.Inner is not visible from module foo