[Issue 5385] New: DMD doesn't block access to "static package" members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 28 04:49:38 PST 2010


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 at puremagic.com
        ReportedBy: hypothermia.frost at gmail.com


--- Comment #0 from hypothermia.frost at gmail.com 2010-12-28 04:47:34 PST ---
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: -------


More information about the Digitalmars-d-bugs mailing list