<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-09-30 11:32 GMT+02:00 Tim Felgentreff <span dir="ltr">&lt;<a href="mailto:timfelgentreff@gmail.com" target="_blank">timfelgentreff@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The behavior before would look up aSymbol in the environment of the superclass. Now we&#39;ll have to import it into the environment of the subclass. Is that the desired new behavior?</div><div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div>Yes please, explicitely import the superclass environment (see #import:).<br></div><div><br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div class="gmail_quote"><div dir="ltr">On Fri, 30 Sep 2016 at 11:23 Tim Felgentreff &lt;<a href="mailto:timfelgentreff@gmail.com" target="_blank">timfelgentreff@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This breaks compiling EToys scripts when those refer to global classes. I probably don&#39;t understand something here, but for context, EToys players are not in the global environment, they create their own otherwise empty environment.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, 29 Sep 2016 at 10:19 &lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Cellier uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-nice.1042.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>trunk/Kernel-nice.1042.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-nice.1042<br>
Author: nice<br>
Time: 29 September 2016, 10:15:16.009388 am<br>
UUID: 8923b113-72cf-414e-802c-<wbr>cef7c50f8ad1<br>
Ancestors: Kernel-tfel.1041, Kernel-nice.798<br>
<br>
Merge Kernel-nice.798 (variable scope fix, don&#39;t resolve name in superclass environment)<br>
<br>
Reminder: this requires some Smalltalk exportSelf.<br>
<br>
=============== Diff against Kernel-tfel.1041 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Class&gt;&gt;bindingOf:environment: (in category &#39;compiling&#39;) -----<br>
  bindingOf: varName environment: anEnvironment<br>
        &quot;Answer the binding of some variable resolved in the scope of the receiver&quot;<br>
        | aSymbol binding |<br>
        aSymbol := varName asSymbol.<br>
<br>
+       &quot;First look in local classVar dictionary.&quot;<br>
+       binding := self classPool bindingOf: aSymbol.<br>
+       binding ifNotNil:[^binding].<br>
-       &quot;First look in classVar dictionary.&quot;<br>
-       (self classThatDefinesClassVariable: aSymbol) ifNotNil:<br>
-               [:x | ^x classPool bindingOf: aSymbol].<br>
<br>
+       &quot;Next look in local shared pools.&quot;<br>
-       &quot;Next look in shared pools.&quot;<br>
        self sharedPools do:[:pool |<br>
                binding := pool bindingOf: aSymbol.<br>
                binding ifNotNil:[^binding].<br>
        ].<br>
<br>
+       &quot;Next look into superclass pools&quot;<br>
+       superclass ifNotNil: [^ superclass bindingOf: aSymbol environment: anEnvironment].<br>
+<br>
+       &quot;No more superclass... Last look in declared environment.&quot;<br>
+       ^anEnvironment bindingOf: aSymbol<br>
-       &quot;Next look in declared environment.&quot;<br>
-       binding := anEnvironment bindingOf: aSymbol.<br>
-       binding ifNotNil:[^binding].<br>
<br>
-       &quot;Finally look higher up the superclass chain and fail at the end.&quot;<br>
-       superclass == nil<br>
-               ifTrue: [^ nil]<br>
-               ifFalse: [^ superclass bindingOf: aSymbol].<br>
-<br>
  !<br>
<br>
<br>
</blockquote></div></blockquote></div>
</div></div><br><br>
<br></blockquote></div><br></div></div>