Bug 9936 – Wrong opBinary/opBinaryRight rewrite.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-15T09:35:00Z
Last change time
2013-04-16T04:54:52Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2013-04-15T09:35:35Z
DMD 2.062: struct S{ auto opBinary(S s){ return 3; } } static assert(!is(typeof(S()+S()))); The static assertion should pass. opBinary is not even a template. The analogous bug exists for opBinaryRight.
Comment #1 by bugzilla — 2013-04-15T16:27:05Z
The wrong right rewrite? Best bugzilla title evar!
Comment #2 by k.hara.pg — 2013-04-15T18:38:17Z
Comment #3 by github-bugzilla — 2013-04-16T04:54:45Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0e5b0ea500919f7c3af6b7eaee10d0feef1db006 fix Issue 9936 - Wrong opBinary/opBinaryRight rewrite. opBinary, opBinaryRight, and opOpAssign had same problem. https://github.com/D-Programming-Language/dmd/commit/f4f4b9080ef0574aec31585a2ca49c3e344c1e28 Merge pull request #1899 from 9rnsr/fix9936 Issue 9936 - Wrong opBinary/opBinaryRight rewrite.