[Issue 5538] Immutable classes can't be passed as messages in std.concurrency
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed May 28 18:15:17 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=5538
Kapps <opantm2+dbugs at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |opantm2+dbugs at gmail.com
Resolution|--- |FIXED
--- Comment #3 from Kapps <opantm2+dbugs at gmail.com> ---
Looks like this works on DMD head.
Updated sample (added name for parameter to allow compiling and wrapped in
main):
import std.variant, std.concurrency;
class C {}
void main() {
thisTid.send(new immutable(C)());
receive((immutable C c) { writeln("got it!"); });
}
DMD 2.065.0:
rdmd test.d
core.exception.AssertError@/opt/dmd/phobos/std/variant.d(288): immutable(C)
DMD Git Head:
rdmd test.d
got it!
--
More information about the Digitalmars-d-bugs
mailing list