private interface IFoo { void foo(); } void main() { IFoo foo; foo.foo; } Error 42: Symbol Undefined _D4Test4IFoo3fooMFZv
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
https://github.com/D-Programming-Language/dmd/commit/9621d716c9abb546f4ff86dd53ffb0956de36ff9 https://github.com/D-Programming-Language/dmd/commit/65e6dd16f0c70c49d5ff89fa23753b5977dd5502
*** Issue 1973 has been marked as a duplicate of this issue. ***