D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2553 - Excess attribute propagation for interfaces
Summary: Excess attribute propagation for interfaces
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
: 1973 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-01-03 05:41 UTC by Max Samukha
Modified: 2015-06-09 01:20 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Max Samukha 2009-01-03 05:41:16 UTC
private interface IFoo
{
   void foo();
}

void main()
{
    IFoo foo;
    foo.foo;
}

Error 42: Symbol Undefined _D4Test4IFoo3fooMFZv
Comment 1 yebblies 2011-06-27 22:34:58 UTC
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 3 yebblies 2012-01-30 18:41:52 UTC
*** Issue 1973 has been marked as a duplicate of this issue. ***