https://issues.dlang.org/show_bug.cgi?id=14046
Issue ID: 14046
Summary: Overlapping dynamic array copy is allowed if struct
contains postblit
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P1
Component: druntime
Assignee: [email protected]
Reporter: [email protected]
Overlapping dynamic array copy is now correctly disallowed in CTFE too (Issue
11467) but in runtime this one remaining case is allowed.
This code should throw `object.Error` in runtime but doesn't:
---
struct S { this(this) { } }
void main()
{
S[1] a;
a[0 .. 1] = a[0 .. 1];
}
---
--