www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8732] New: std.typecons: BlackHole/WhiteHole always declare methods public

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8732

           Summary: std.typecons: BlackHole/WhiteHole always declare
                    methods public
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



09:15:56 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 27 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8732


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME



15:15:17 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 17 2013