Re: const(int) cannot be sent as int message

2016-03-31 Thread Meta via Digitalmars-d-learn
On Thursday, 31 March 2016 at 13:47:25 UTC, Steven Schveighoffer wrote: Bug, but probably of the enhancement variety I think (I don't think this is a small project). Receive should canonicalize the input and requested receive type. That is, receiveOnly!(const(int)) should really call receiveOnl

Re: const(int) cannot be sent as int message

2016-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/30/16 8:01 PM, Ali Çehreli wrote: As expected, the following trivial case works: void main() { auto func = delegate(int i) {}; // expects int func(const(int)(42));// passes const(int) } The following concurrency program fails at runtime: import core.thread; import

const(int) cannot be sent as int message

2016-03-30 Thread Ali Çehreli via Digitalmars-d-learn
As expected, the following trivial case works: void main() { auto func = delegate(int i) {}; // expects int func(const(int)(42));// passes const(int) } The following concurrency program fails at runtime: import core.thread; import std.concurrency; void foo() { receiv