<div dir="ltr"><div>import std.stdio;</div><div>import std.traits;</div><div><br></div><div>int main(string[] args)</div><div>{</div><div><span style="white-space:pre">        </span>immutable int[] arr = [1,2,3,4,5];</div><div><span style="white-space:pre">    </span>writeln(ImplicitConversionTargets!(typeof(arr)).stringof);</div><div><span style="white-space:pre">    </span>return 0;</div><div>}</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 24, 2017 at 1:36 PM, Daniel Kozak <span dir="ltr"><<a href="mailto:kozzi11@gmail.com" target="_blank">kozzi11@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Should print something like this:<div>std.concurrency.<wbr>OwnerTerminated@std/<wbr>concurrency.d(223): Owner terminated<br></div><div><br></div><div>Because main thread is terminated, because types do not match</div><div><br></div><div>this will work </div><div><div>import std.stdio;</div><div>import std.concurrency;</div><div><br></div><div>void fun()</div><div>{</div><div><span style="white-space:pre-wrap">     </span>receive( (immutable (int)[] v) => writeln(v) );</div><div>}</div><div><br></div><div>int main(string[] args)</div><div>{</div><span class=""><div><span style="white-space:pre-wrap"> </span>immutable int[] arr = [1,2,3,4,5];</div></span><div><span style="white-space:pre-wrap">  </span>auto t = spawn(&fun);</div><div><span style="white-space:pre-wrap">        </span>t.send(arr);<span style="white-space:pre-wrap">    </span></div><div><span style="white-space:pre-wrap"> </span>return 0;</div><div>}</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 24, 2017 at 1:06 PM, SrMordred via Digitalmars-d-learn <span dir="ltr"><<a href="mailto:digitalmars-d-learn@puremagic.com" target="_blank">digitalmars-d-learn@<wbr>puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-6467339883005714318HOEnZb"><div class="m_-6467339883005714318h5">On Friday, 24 November 2017 at 12:05:16 UTC, SrMordred wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
immutable int[] arr = [1,2,3,4,5];<br>
auto t = spawn({ receive( (immutable int[] v) => writeln(v) );});<br>
t.send(arr);<br>
<br>
whats the problem here?<br>
</blockquote>
<br></div></div>
Nothing prints out<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>