<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000"><span style="font-size: 13.3333px">Hi Eliot, hi all!</span><div class="mb_sig" style="font-size: 13.3333px"></div><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px">I am having issues with the inlining of #to:do: in combination with decompiling a block and accessing the temps.</div><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px">Here is a piece of code that works as expected:</div><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px"><div>| result context |</div><div>result := OrderedCollection new.</div><div><br></div><div><b>(1 to: 5) do</b>: [:each |</div><div><span style="white-space: pre;">  </span>result add: [:object | object + each]].<span style="white-space: pre;">    </span></div><div><br></div><div>context := (result at: 3) outerContext.</div><div>context namedTempAt: (context tempNames indexOf: 'each').<b> " == 3"</b></div></div><div style="font-size: 13.3333px"><b><br></b></div><div style="font-size: 13.3333px">HOWEVER, using #to:do: the result changes because code gets inlined:</div><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px"><div style="font-size: 13.3333px">| result context |</div><div style="font-size: 13.3333px">result := OrderedCollection new.</div><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px"><b>1 to: 5 do</b>: [:each |</div><div style="font-size: 13.3333px"><span style="white-space: pre;">      </span>result add: [:object | object + each]].<span style="white-space: pre;">    </span></div><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px">context := (result at: 3) outerContext.</div><div style="font-size: 13.3333px">context namedTempAt: (context tempNames indexOf: 'each').<b> " == 6"</b></div></div><div style="font-size: 13.3333px"><b><br></b></div><div style="font-size: 13.3333px">What is my goal here? I want to unpack the block statement and fill in the temps. <span style="font-size: 13.3333px">For all those [:object | object + each] in "result" I want to collect the strings:</span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px"><br></span></div><div style="font-size: 13.3333px">-> 'object + 1'</div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px">-> 'object + 2'</span><br></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px">-> 'object + 3'</span><span style="font-size: 13.3333px"><br></span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px">-> 'object + 4'</span><span style="font-size: 13.3333px"><br></span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px">-> 'object + 5'</span><span style="font-size: 13.3333px"><br></span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px"><br></span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px">Is there a way to access the values of temps when the block closures are created this way?</span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px"><br></span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px">Best,</span></div><div style="font-size: 13.3333px"><span style="font-size: 13.3333px">Marcel</span></div><div class="mb_sig"></div></div>