Bug 4742 – int % BigInt should work

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-08-27T17:14:00Z
Last change time
2010-09-20T19:02:41Z
Assigned to
nobody
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2010-08-27T17:14:08Z
import std.bigint; void main() { BigInt i; auto foo = 1 % i; } test9.d(5): Error: incompatible types for ((1) % (i)): 'int' and 'BigInt'
Comment #1 by dsimcha — 2010-08-27T17:36:20Z
Add /, /= to the list, too.
Comment #2 by clugdbug — 2010-09-20T19:02:41Z
http://www.dsource.org/projects/phobos/changeset/2042 Fixes / and %. int /= BigInt and int %= BigInt can't be done with the new operator overloading -- there's no such thing as opopAssignRight(). I have created bug 4903 for that.