May 01, 2010 [Issue 4141] New: unary ++ (post increment) invokes opBinary | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=4141 Summary: unary ++ (post increment) invokes opBinary Product: D Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: k-foley@onu.edu --- Comment #0 from Kyle Foley <k-foley@onu.edu> 2010-05-01 16:22:37 PDT --- DMD 2.043 struct A { int _; void opBinary(string op, U)(U rhs) { pragma(msg, op); } } auto a = A(42); a++; --- $ rdmd opbugs.d ++ opbugs.d(10): Error: template opbugs.main.A.opBinary(string op,U) does not match any function template declaration opbugs.d(10): Error: template opbugs.main.A.opBinary(string op,U) cannot deduce template function from argument types !()() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
December 20, 2012 [Issue 4141] unary ++ (post increment) tries and fails to invoke opBinary | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kyle Foley | http://d.puremagic.com/issues/show_bug.cgi?id=4141 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich@gmail.com Resolution| |FIXED --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-20 15:11:44 PST --- Proper error message in 2.060: test.d(11): Error: 'a += 1' is not a scalar, it is a A test.d(11): Error: incompatible types for ((a) += (1)): 'A' and 'int' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation