D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15211 - BigInt%uint and BigInt%ulong return different types
Summary: BigInt%uint and BigInt%ulong return different types
Status: RESOLVED DUPLICATE of issue 18224
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-16 23:59 UTC by Vladimir Panteleev
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2015-10-16 23:59:30 UTC
import std.bigint;
pragma(msg, typeof(BigInt.init%uint.init));
pragma(msg, typeof(BigInt.init%ulong.init));


Prints:

int
BigInt

This is especially annoying when the second operand is a size_t.
Comment 1 basile-z 2018-01-14 12:41:17 UTC
Both return long in DMD trunk: https://github.com/dlang/phobos/pull/6025/files

*** This issue has been marked as a duplicate of issue 18224 ***