https://issues.dlang.org/show_bug.cgi?id=13930
Issue ID: 13930
Summary: std.concurrency can't immutable AA send to another
thread
Product: D
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: [email protected]
Reporter: [email protected]
cat > bug.d << CODE
import std.concurrency;
void main()
{
immutable aa = ["0":0];
thisTid.send(aa);
}
CODE
dmd -c bug
----
Trying to send an immutable associative array to another thread fails with this
error messsage. Looks like a problem with copying in Variant or so.
Hash tables are basic types so this should be supported.
----
/usr/include/dmd/phobos/std/variant.d(621): Error: template instance
std.variant.VariantN!32LU.VariantN.handler!(immutable(int[string])) error
instantiating
/usr/include/dmd/phobos/std/variant.d(571): instantiated from here:
opAssign!(immutable(int[string]))
/usr/include/dmd/phobos/std/concurrency.d(109): instantiated from here:
__ctor!(immutable(int[string]))
/usr/include/dmd/phobos/std/concurrency.d(588): instantiated from here:
__ctor!(immutable(int[string]))
/usr/include/dmd/phobos/std/concurrency.d(578): instantiated from here:
_send!(immutable(int[string]))
/usr/include/dmd/phobos/std/concurrency.d(556): instantiated from here:
_send!(immutable(int[string]))
bug.d(6): instantiated from here: send!(immutable(int[string]))
----
--