Bug 19600 – Cannot assign `new`d stuct at CTFE

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-01-21T02:49:02Z
Last change time
2019-01-21T03:33:08Z
Assigned to
No Owner
Creator
Nicholas Wilson

Comments

Comment #0 by iamthewilsonator — 2019-01-21T02:49:02Z
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
Comment #1 by iamthewilsonator — 2019-01-21T03:33:08Z
*** This issue has been marked as a duplicate of issue 19598 ***