is it a bug? protection attributes on interfaces/abstracts have no effect outside module?

Martin Nowak dawg at dawgfoto.de
Fri Feb 3 13:08:11 PST 2012


On Fri, 03 Feb 2012 13:27:34 +0100, dennis luehring <dl.soluz at gmx.net>  
wrote:

> repost from d.learn
>
> is it a bug? protection attributes on interfaces/abstracts have no  
> effect outside modules?
>
> module types;
>
> private interface itest
> {
>     public void blub2();
>     private void blub3();
> }
>
> private class test
> {
>     protected abstract void blub4();
>     public abstract void blub5();
> }
>
> ---
>
> module classes;
>
> import types;
>
> class A: itest
> {
>     public void blub2(){}
>     public void blub3(){}
> }
>
> class B: test
> {
>     protected override void blub4(){}
>     public override void blub5(){}
> }
>
> class C: test
> {
>     public override void blub4(){}
>     public override void blub5(){}
> }
>
> should the attributes do anything or is it a bug to allow the usage?

It's a bug. There is a pending pull request to fix the remaining  
protection issues.


More information about the Digitalmars-d mailing list