[Issue 17108] Associative array byKeyValue is unsafe

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 8 16:20:55 PST 2017


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

hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at quickfur.ath.cx

--- Comment #1 from hsteoh at quickfur.ath.cx ---
Hmph. This is caused by the last line in object.byKeyValue()():

----
/usr/src/d/druntime/import/object.d(2071): Error: cast from int[string] to
void* not allowed in safe code
test.d(4): Error: template instance object.byKeyValue!(int[string], string,
int) error instantiating
----

Could this be a regression?  I vaguely recall casting to void* used to be
allowed, you just can't dereference it unless you're in @trusted land.

--


More information about the Digitalmars-d-bugs mailing list