[Issue 15702] std.socket.Socket.receive breaks @safe

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 18 10:51:20 PST 2016


https://issues.dlang.org/show_bug.cgi?id=15702

--- Comment #4 from hsteoh at quickfur.ath.cx ---
Here's another example that shows why @safe/@trusted on any function that takes
(a non-const) void[] must be considered suspect (credit: Steven Schveighoffer,
from the forum thread):

----
void foo(void[] arr) @safe
{
    void[] arr2 = [123, 456, 789]; // this is clearly @safe
    arr[] = arr2[0 .. arr.length]; // so is this, under the current definition
}
----

--


More information about the Digitalmars-d-bugs mailing list