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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to