[Issue 13963] New: BigInt modulo ulong is rejected
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jan 9 21:22:30 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13963
Issue ID: 13963
Summary: BigInt modulo ulong is rejected
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: markus at oberhumer.com
dmd 2.066.1
import std.bigint;
void main()
{
BigInt x = 1;
BigInt y = 1;
x %= y; // OK
x %= 1; // OK
x %= 1U; // OK
x %= 1L; // OK
x %= 1UL; // OK
x = x % y; // OK
x = x % 1; // OK
x = x % 1U; // OK
x = x % 1L; // Error: incompatible types for ((x) % (1L)): 'BigInt' and
'long'
x = x % 1UL; // Error: incompatible types for ((x) % (1LU)): 'BigInt' and
'ulong'
}
This looks similar to issue 13391.
--
More information about the Digitalmars-d-bugs
mailing list