Bug 16094 – error: overlapping slice assignment (CTFE)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-05-30T00:38:00Z
Last change time
2016-10-01T11:47:16Z
Keywords
CTFE, pull, rejects-valid
Assigned to
nobody
Creator
rtcvb32

Comments

Comment #0 by rtcvb32 — 2016-05-30T00:38:49Z
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
Comment #1 by k.hara.pg — 2016-05-31T11:11:31Z
Comment #2 by github-bugzilla — 2016-06-23T00:00:56Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/560f606ae94af80881606a5a8151a3cacb1b5d30 fix Issue 16094 - error: overlapping slice assignment (CTFE) https://github.com/dlang/dmd/commit/20e1c81ec0642b80413c1093702e5ae8d5fde313 Merge pull request #5827 from 9rnsr/fix16094 Issue 16094 - error: overlapping slice assignment (CTFE)
Comment #3 by github-bugzilla — 2016-10-01T11:47:16Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/560f606ae94af80881606a5a8151a3cacb1b5d30 fix Issue 16094 - error: overlapping slice assignment (CTFE) https://github.com/dlang/dmd/commit/20e1c81ec0642b80413c1093702e5ae8d5fde313 Merge pull request #5827 from 9rnsr/fix16094