[Issue 6460] New: [CTFE] internal error assigning struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 9 13:56:30 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6460

           Summary: [CTFE]  internal error assigning struct
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dmitry.olsh at gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2011-08-09 13:56:27 PDT ---
Test case:

int f()
{
    struct FixedStack(T)
    {
        T[] arr;
//commenting out this constructor makes it work
        this(T[] storage){   arr = storage;  }

    }
    auto counterRange = FixedStack!uint(new uint[22]);
    return 0;
}

enum k = f();

dmd's output:
struct.d(9): Error: CTFE internal error assigning struct
struct.d(13): Error: cannot evaluate f() at compile time

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list