https://d.puremagic.com/issues/show_bug.cgi?id=11467
Summary: [CTFE] Overlapping array copy is allowed in CT Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid, CTFE Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin....@gmail.com --- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2013-11-07 18:37:54 MSK --- Overlapping array copy is allowed (and works fine for now) during CTFE: --- static assert({ auto a = [0, 1, 2, 3, 4]; a[0 .. 4] = a[1 .. 5]; assert(a == [1, 2, 3, 4, 4]); a = [0, 1, 2, 3, 4]; a[1 .. 5] = a[0 .. 4]; assert(a == [0, 0, 1, 2, 3]); return 1; }()); --- But it is inconsistent with runtime behaviour when exception is thrown in such case. I'd say it should be disallowed in CTFE too. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------