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

           Summary: Tuple field access problem in pure function
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-07-18 01:45:10 PDT ---
DMD 2.054:


import std.typecons;
Tuple!(int, "x") foo() pure {
    int y1 = foo().x;
    int y2 = foo()[0];
    return typeof(return)(0);
}
void main() {}


test.d(3): Error: pure nested function 'foo' cannot access mutable data
'_field_field_0'
test.d(4): Error: no [] operator overload for type Tuple!(int,"x")

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

Reply via email to