[Issue 19598] New: CTFE fails to assign struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 21 00:42:23 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19598

          Issue ID: 19598
           Summary: CTFE fails to assign struct
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: turkeyman at gmail.com

int test()
{
    int t0;
    int* n0 = new int;
    *n0 = t0;

    struct S { int x; }
    S t1;
    S* n1 = new S;
    *n1 = t1;

    return 10;
}
pragma(msg, test());


The int assigns fine, the struct with an int member doesn't.
Is there a workaround?

--


More information about the Digitalmars-d-bugs mailing list