digitalmars.D.bugs - [Issue 3966] New: opUnary("++") doesn't work
- d-bugmail puremagic.com (32/32) Mar 15 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3966
- d-bugmail puremagic.com (12/12) Jun 09 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3966
http://d.puremagic.com/issues/show_bug.cgi?id=3966 Summary: opUnary("++") doesn't work Product: D Version: 2.041 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc According to the specs of the new operator overloading this program is correct, but it currently doesn't compile: struct Foo { int x; Foo opUnary(string op:"++")() { this.x++; return this; } } void main() { Foo f = Foo(5); f++; // line 10 } The compiler gives: test.d(10): Error: var has no effect in expression (__tmp1) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 15 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3966 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug yahoo.com.au Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 4231 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 09 2010