www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5385] New: DMD doesn't block access to "static package" members

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

           Summary: DMD doesn't block access to "static package" members
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: hypothermia.frost gmail.com



DMD(2.051) doesn't generate access error for methods with static package
attributes when accessed from another package.
For example:

module package.test;
class Test 
{
 static package int test; //static+package

 package int test2;//only package
}

module main;
import std.stdio;
import package.test;

void main()
{
 writeln(Test.test);//Should generate an error, but it doesn't!
 auto t=new Test();
 writeln(t.test2);  //Generates an error correctly
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 28 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5385


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

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



15:50:54 PST ---
https://github.com/D-Programming-Language/dmd/pull/1386

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




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

https://github.com/D-Programming-Language/dmd/commit/6ef6b721642be8cb5a9ffbcef6f80d92fc071bc5
Fixes Issue 5385 - Access must be checked for static and __gshared fields.

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


Issue 5385 - Access must be checked for static and __gshared fields

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 18 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5385


Kenji Hara <k.hara.pg gmail.com> changed:

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



This is a part of issue 1161.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 18 2012