[Bug 49] Protection attributes of mixin instances are applied to a the wrong scope.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 12 08:13:47 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=49


daiphoenix at lycos.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Error instantiating a mixin |Protection attributes of
                   |with a private constructor  |mixin instances are applied
                   |                            |to a the wrong scope.




------- Comment #1 from daiphoenix at lycos.com  2006-04-12 10:13 -------
Actually, this is part of the more general bug:
Protection attributes of mixin instances are applied to the wrong scope.
The following illustrates it:


  template Baz() {
    private void privfunc(){ }
    // private this() { }
  }

  class Foo {
    mixin Baz!();  

    void testfunc() {
        privfunc(); // Error: .privfunc is private
    }
  }


-- 




More information about the Digitalmars-d-bugs mailing list