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

           Summary: Return value for Tuple.opAssign
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-08-02 12:11:00 PDT ---
I'd like this operation to be supported:


import std.typecons;
int foo() {
    int[2] a;
    return a[1] = 5; // ok
}
int bar() {
    Tuple!(int)[2] a;
    return a[1] = tuple(5); // error
}
void main() {}


DMD 2.060beta4 gives:

temp.d(8): Error: cannot implicitly convert expression
(a[1u].opAssign(tuple(5))) of type void to int

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

Reply via email to