Bug 2553 – Excess attribute propagation for interfaces

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-01-03T05:41:00Z
Last change time
2015-06-09T01:20:44Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
samukha

Comments

Comment #0 by samukha — 2009-01-03T05:41:16Z
private interface IFoo { void foo(); } void main() { IFoo foo; foo.foo; } Error 42: Symbol Undefined _D4Test4IFoo3fooMFZv
Comment #1 by yebblies — 2011-06-27T22:34:58Z
The problem here is that private is getting applied to the members of IFoo, not just the declaration. This is related to bug 5110, which was fixed for structs and classes, but not interfaces. The fix is to only allow the same attribute propagation for interfaces that is allowed for classes, and to set the default protection for interfaces to public. https://github.com/D-Programming-Language/dmd/pull/170
Comment #2 by yebblies — 2011-10-19T03:00:33Z
Comment #3 by yebblies — 2012-01-30T18:41:52Z
*** Issue 1973 has been marked as a duplicate of this issue. ***