digitalmars.D.bugs - [Issue 24622] New: Modify const data with void[] concatenation/append
- d-bugmail puremagic.com (23/23) Jun 21 https://issues.dlang.org/show_bug.cgi?id=24622
https://issues.dlang.org/show_bug.cgi?id=24622 Issue ID: 24622 Summary: Modify const data with void[] concatenation/append Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: nick geany.org Related to issue 17148. void g(int*[] a, const(int*)[] b) system { void[] va = a; va[] = va.init ~ b; // a now contains b's data *a[0] = 0; // modify const data } Appending a const array to void[] also needs to be disallowed. typeof(void[] ~ const(void)[]) should be const(void)[], not void[]. --
Jun 21