<p dir="auto">I can get the following on Julia 1.6.1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; foo() = ===(0)
foo (generic function with 1 method)

julia&gt; foo()
Internal error: encountered unexpected error in runtime:
BoundsError(a=Array{Any, (2,)}[
  Main.:(===),
  0], i=(3,))
jl_bounds_error_ints at /buildworker/worker/package_linux64/build/src/rtutils.c:186"><pre class="notranslate"><code class="notranslate">julia&gt; foo() = ===(0)
foo (generic function with 1 method)

julia&gt; foo()
Internal error: encountered unexpected error in runtime:
BoundsError(a=Array{Any, (2,)}[
  Main.:(===),
  0], i=(3,))
jl_bounds_error_ints at /buildworker/worker/package_linux64/build/src/rtutils.c:186
</code></pre></div>
<p dir="auto">The syntax may indeed be invalid, but it doesn't produce a friendly error.</p>
<p dir="auto">This needs to be implemented in <code class="notranslate">task.c</code>. After copying all the fields of the <code class="notranslate">jl_task_t</code>, the following extra changes are needed:</p>
<ul dir="auto">
<li>deepcopy <code class="notranslate">tls</code></li>
<li>set <code class="notranslate">consumers</code> to <code class="notranslate">jl_nothing</code></li>
<li>set <code class="notranslate">donenotify</code> to <code class="notranslate">jl_nothing</code></li>
<li>allocate with <code class="notranslate">allocb</code> a copy of <code class="notranslate">stkbuf</code>, which is <code class="notranslate">bufsz</code> bytes</li>
</ul>
<p dir="auto">I think there is a chance that will work.</p>