[Issue 14767] New: BigInt compile time errors
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 3 09:19:26 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14767
Issue ID: 14767
Summary: BigInt compile time errors
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: paul.d.anderson at comcast.net
The following code fails to compile and responds with the given error message.
Varying the "plusTwo" function doesn't work; as long as there is an arithmetic
operation the error occurs.
It seems to mean that there is no way to modify a BigInt at compile time. This
seriously limits the usability of the type.
enum BigInt test1 = BigInt(123);
enum BigInt test2 = plusTwo(test1);
public static BigInt plusTwo(in BigInt n)
{
return n + 2;
}
void main()
{
}
Error message:
C:\D\dmd2\windows\bin\..\..\src\phobos\std\internal\math\biguintx86.d(226):
Error: asm statements cannot be interpreted at compile time
Error occurs with dmd 2.067.1 for 32-bit Windows. Does not occur with Windows
64-bit version
--
More information about the Digitalmars-d-bugs
mailing list