[Issue 19600] New: Cannot assign `new`d stuct as CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 21 02:49:02 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19600
Issue ID: 19600
Summary: Cannot assign `new`d stuct as CTFE
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: iamthewilsonator at hotmail.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());
fails with Error: *n1 = t1 cannot be evaluated at compile time
--
More information about the Digitalmars-d-bugs
mailing list