[Issue 10686] New: No [] operator overload for immutable Tuple

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 20 15:27:46 PDT 2013


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

           Summary: No [] operator overload for immutable Tuple
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 15:27:45 PDT ---
import std.typecons: Tuple;
void main() {
    immutable Tuple!(int) t1;
    auto r1 = t1[0]; // OK
    immutable Tuple!(int, "x") t2;
    auto r2 = t2[0]; // error
}


DMD 2.064alpha gives:

test.d(6): Error: no [] operator overload for type immutable(Tuple!(int, "x"))

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