[Issue 10257] New: .tupleof loses access information upon iteration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 3 12:44:05 PDT 2013


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

           Summary: .tupleof loses access information upon iteration
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-06-03 12:44:04 PDT ---
-----
void main()
{
    struct S
    {
        private int x;
    }

    S store;

    foreach (idx, val; store.tupleof)
    {
        pragma(msg, "direct: " ~ __traits(getProtection, store.tupleof[idx]));
        pragma(msg, "indirect: " ~ __traits(getProtection, val));
    }
}
-----

Writes:

> direct: private
> indirect: public

I'm not sure how hard it will be to fix this, or if it's possible at all.

-- 
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