https://issues.dlang.org/show_bug.cgi?id=20400
Issue ID: 20400
Summary: CTFE increasing length of array of characters changes
its value
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Test case:
```
auto test()
{
char[] s = cast(char[])"1234";
char[] ret = s[2 .. $];
ret.length += 1;
ret[$-1] = '5';
return ret;
}
pragma(msg, test());
```
output: 125
expected: 345
--
