Bug 6003 – BigInt length and conversion properties problems
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-05-14T17:36:00Z
Last change time
2011-05-16T22:03:50Z
Assigned to
nobody
Creator
paul.d.anderson
Comments
Comment #0 by paul.d.anderson — 2011-05-14T17:36:06Z
When I try to compile this code:
import std.bigint;
void main() {
BigInt big = BigInt(123456);
int size = big.uintLength();
int value = big.toInt();
}
I get the following errors:
TestToInt.d(5): Error: no property 'uintLength' for type 'BigInt'
TestToInt.d(5): Error: function expected before (), not __error of type int
TestToInt.d(6): Error: no property 'toInt' for type 'BigInt'
TestToInt.d(6): Error: function expected before (), not __error of type int
Comment #1 by kennytm — 2011-05-14T23:49:51Z
Not reproducible.
BTW, '.toInt()' currently returns a 'long'. Shouldn't it be an 'int'?
Comment #2 by paul.d.anderson — 2011-05-16T22:02:46Z
Sorry. I was using an old version of the compiler. When I updated the compiler the file compiled as expected.