[Issue 1223] New: .tupleof tries to access protected members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 9 02:03:34 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1223

           Summary: .tupleof tries to access protected members
           Product: D
           Version: 1.014
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: hhasemann at web.de


.tupleof should only count accessible members, it seems to correctly
handle private ones (with ignoring them) but always tries to access protected
ones, which leads to a "member bar not accessible" error at compile time.
The following example reproduces this error on dmd 1.014:

--- foo.d ---
module foo;
class Foo { protected Foo bar=null; }

--- main.d ---
import foo;

void main() {
  auto test=(new foo).tupleof[0];
}


-- 



More information about the Digitalmars-d-bugs mailing list