[Issue 2111] New: Protection incorrectly resolved when accessing super class' tupleof

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 18 14:44:15 PDT 2008


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

           Summary: Protection incorrectly resolved when accessing super
                    class' tupleof
           Product: D
           Version: 1.030
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: h3r3tic at mat.uni.torun.pl


Main.d
------
module Main;
import Mod;

class Bar : Foo {
        alias typeof(Foo.tupleof) Bleh;
}


Mod.d
-----
module Mod;

class Foo {
        protected int a;
}


Result:
-------
Main.d(5): class Mod.Foo member a is not accessible



BTW, when tupleof fails at protection, it becomes useless... There should
either be a way to check protection for fields or tupleof should not yield
inaccessible fields at all, IMHO.


-- 



More information about the Digitalmars-d-bugs mailing list