www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8717] New: `private` and `protected` restrict member usage in same module

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

           Summary: `private` and `protected` restrict member usage in
                    same module
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



09:56:32 MSD ---
---
struct C // struct, class, or union
{
private: // private or protected, for package see Issue 8716
    enum e = 0;
    immutable static int si = 0;
    static int sf() { return 0; }
    immutable int i = 0;
    int f() const { return 0; }
}

static assert(C.e == 0);
static assert(C.si == 0);
static assert(C.sf() == 0);
static assert(C.i == 0);

static assert(C.init.e == 0);
static assert(C.init.si == 0); // undefined identifier 'si'
static assert(C.init.sf() == 0); // struct main.C member sf is not accessible
static assert(C.init.i == 0);
static assert(C.init.f() == 0); // struct main.C member f is not accessible
---
There is no such errors if asserts are e.g. in a function.

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |andrej.mitrovich gmail.com
         AssignedTo|nobody puremagic.com        |andrej.mitrovich gmail.com



13:46:01 PST ---
https://github.com/D-Programming-Language/dmd/pull/1557

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8717




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1a97d3662e905620780c5253bf25f7c3b2d21621
Fixes Issue 8717 - Private and Protected should be accessible from within
same module.

https://github.com/D-Programming-Language/dmd/commit/e7eff4deef0fb5ec9a89cee4716785832fc41fb9


Issue 8717 - Private and Protected should be accessible from within the same
module.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 29 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8717


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

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


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