[Issue 14137] std.socket.getAddressInfo breaks @safety
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Feb 17 22:18:55 PST 2016
https://issues.dlang.org/show_bug.cgi?id=14137
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at quickfur.ath.cx
--- Comment #2 from hsteoh at quickfur.ath.cx ---
This is very bad. getAddressInfo() takes an ARBITRARY TYPE for its `options`
parameter, yet it's marked @trusted ??! That's clearly ridiculous. What we need
is a @safe unittest to ensure that it does not add any non-safety in the
function body, but let the compiler determine whether the resulting combination
with T is actually @safe.
Unfortunately, even this is not enough, because getAddressInfoImpl is @system,
so we need to wrap the call to it in a @trusted nested function. Ugh.
--
More information about the Digitalmars-d-bugs
mailing list