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: [email protected]
Reporter: [email protected]
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.
--