Bug 8732 – std.typecons: BlackHole/WhiteHole always declare methods public
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-27T09:15:00Z
Last change time
2013-09-17T15:15:17Z
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2012-09-27T09:15:56Z
inter.d:
module inter;
interface Inter
{
protected void test();
}
test.d:
module test;
import inter;
import std.typecons;
void main()
{
auto o = new BlackHole!Inter;
o.test(); // works, o.test was declared public
}
Note: This will be fixable only after Pull 856 is implemented (Protection trait).
https://github.com/D-Programming-Language/dmd/pull/856#issuecomment-8941587
Comment #1 by andrej.mitrovich — 2013-09-17T15:15:17Z
Interesting.. this seems to fail as it should in 2.063.2, but I'm not sure if on purpose:
test.d(9): Error: class std.typecons.AutoImplement!(Inter, generateEmptyFunction, isAbstractFunction).AutoImplement member test is not accessible