digitalmars.D.bugs - [Issue 15355] New: unstable operator overloading with comma expression
- via Digitalmars-d-bugs (37/37) Nov 18 2015 https://issues.dlang.org/show_bug.cgi?id=15355
https://issues.dlang.org/show_bug.cgi?id=15355 Issue ID: 15355 Summary: unstable operator overloading with comma expression Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: k.hara.pg gmail.com Test case: struct S { int x; int y; void opIndexAssign(int v, int n) { x = v; } ref int opIndex(int n) { return y; } } void main() { S s1; s1[0] = 1; assert(s1.x == 1); S s2; (1, s2[0]) = 1; assert(s2.y == 1); // shouldn't be s2.x == 1 ? } --
Nov 18 2015