[Issue 16094] New: error: overlapping slice assignment (CTFE)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 29 17:38:49 PDT 2016


          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: nobody at puremagic.com
          Reporter: rtcvb32 at yahoo.com

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


More information about the Digitalmars-d-bugs mailing list