Bug 6435 – Regression (2.054) Cannot append to a string member of a struct in CTFE

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-08-03T11:19:00Z
Last change time
2011-08-04T07:35:26Z
Assigned to
nobody
Creator
samukha

Comments

Comment #0 by samukha — 2011-08-03T11:19:10Z
struct S { string bar; } int foo() { S s; s.bar = "one"; // compiles if this is commented out s.bar ~= "two"; return 0; } auto x = foo(); void main() { } Error: s.bar ~= "two" cannot be evaluated at compile time
Comment #1 by clugdbug — 2011-08-04T05:26:53Z
This has already been fixed in git. *** This issue has been marked as a duplicate of issue 6276 ***
Comment #2 by samukha — 2011-08-04T07:35:26Z
Great, thanks!