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


David Simcha <dsim...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid


--- Comment #1 from David Simcha <dsim...@yahoo.com> 2010-11-11 12:07:32 PST ---
Argh, accidentally hit enter.  Please disregard the blank first post.

struct OpIndexAssign {
    void opIndexAssign(uint val, uint index) {}
    uint opIndex(uint index) { return 42; }
}

struct Struct {
    OpIndexAssign oas;

    OpIndexAssign getter() @property {
        return oas;
    }
}

void main() {
    Struct s;
    s.oas[5] = 5;  // Works
    s.getter[5] = 5;  // Fails
}


Error message:

test.d(17): Error: s.getter()[5u] is not an lvalue

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

Reply via email to