www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19883] New: Cyclic constructor call for BigInt(dstring)


          Issue ID: 19883
           Summary: Cyclic constructor call for BigInt(dstring)
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: meapineapple gmail.com

Expected behavior:

BigInt can be initialized with a string, wstring, or dstring.

Actual behavior:

Attempting to initialize BigInt (std.bigint) with a dstring produces an error.

Example repro case:

C:\D\dmd.2.081.2\dmd2\windows\bin\..\..\src\phobos\std\bigint.d(122): Error:
cyclic constructor call
E:\...\test.d(3): Error: template instance `std.bigint.BigInt.__ctor!dstring`
error instantiating

    void main() {
        import std.bigint;
        auto n = BigInt("1234"d);

May 18 2019