https://issues.dlang.org/show_bug.cgi?id=16094
Issue ID: 16094
Summary: error: overlapping slice assignment (CTFE)
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The following function f works properly when compiled, but during CTFE breaks
and errors out with: Error: overlapping slice assignment [3..6] = [0..3]
char[] f() {
char[] x = new char[6];
x[3..6] = x[0..3];
return x;
}
enum cpy = f();
version: dmd 2.071.0 32bit
OS: Windows 7 x64
--