<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Christoph,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 8, 2021 at 5:27 AM Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">





<div>


<div dir="ltr">
<div id="gmail-m_8329297675066240798x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif">
<p>In this case, the shadows were actually kind of intended because the field blocks should never refer to the receiver instance ...</p>
<p>Not sure how we can ensure this otherwise. At least we have tests for the "copy expression" feature which depends on this invariant.</p></div></div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">The only issue here is that if a method or block argument or temporary has the same name as an instance variable then a warning is printed to the transcript when the method is recompiled.  We should try and eliminate such warnings.  So certainly in trunk code we should avoid shadowing variable names.  The code itself is fine; the intent is fine.  My patch is only intended to avoid the warning.  Ideally on recompiling the entire trunk system we would see no such warnings.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div dir="ltr"><div id="gmail-m_8329297675066240798x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif">
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8329297675066240798x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> im Auftrag von <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>><br>
<b>Gesendet:</b> Mittwoch, 8. September 2021 05:38:07<br>
<b>An:</b> <a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>; <a href="mailto:packages@lists.squeakfoundation.org" target="_blank">packages@lists.squeakfoundation.org</a><br>
<b>Betreff:</b> [squeak-dev] The Trunk: Tools-eem.1064.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div>Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-eem.1064.mcz" target="_blank">http://source.squeak.org/trunk/Tools-eem.1064.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-eem.1064<br>
Author: eem<br>
Time: 7 September 2021, 8:38:04.292324 pm<br>
UUID: 2544ee88-6941-42d9-bc13-e3b384fb4708<br>
Ancestors: Tools-ul.1063<br>
<br>
Fix some shadowed inst var warnings in the inspector; 'object' is an inst var name but was used as a block arg name in a few methods.<br>
<br>
=============== Diff against Tools-ul.1063 ===============<br>
<br>
Item was changed:<br>
  ----- Method: BasicInspector>>fieldSelf (in category 'fields') -----<br>
  fieldSelf<br>
  <br>
         ^ (self newFieldForType: #self key: #self)<br>
                 name: 'self'; emphasizeName;<br>
+                valueGetter: [:obj | self basicObjectPrintString]; printValueAsIs;<br>
-                valueGetter: [:object | self basicObjectPrintString]; printValueAsIs;<br>
                 valueGetterExpression: 'self';<br>
+                valueSetter: [:obj :value | self object: value];  "Switch to another object-under-inspection."<br>
-                valueSetter: [:object :value | self object: value];  "Switch to another object-under-inspection."<br>
                 yourself!<br>
<br>
Item was changed:<br>
  ----- Method: BasicInspector>>streamInstanceVariablesOn: (in category 'fields - streaming') -----<br>
  streamInstanceVariablesOn: aStream<br>
  <br>
         | attributesForInstVars |<br>
         attributesForInstVars :=  (UserInterfaceTheme current get: #instVar for: #SHTextStylerST80) ifNil: [#()].<br>
         <br>
         (thisContext objectClass: self object) allInstVarNames withIndexDo: [:name :index |            
<br>
                 aStream nextPut: ((self newFieldForType: #instVar key: name)<br>
                         name: name; styleName: attributesForInstVars;<br>
+                        valueGetter: [:obj | thisContext object: obj instVarAt: index];<br>
-                        valueGetter: [:object | thisContext object: object instVarAt: index];<br>
                         valueGetterExpression: ('thisContext object: {1} instVarAt: {2}' format: { 'self'. index });
<br>
+                        valueSetter: [:obj :value | thisContext object: obj instVarAt: index put: value];<br>
-                        valueSetter: [:object :value | thisContext object: object instVarAt: index put: value];<br>
                         yourself)].!<br>
<br>
Item was changed:<br>
  ----- Method: Inspector>>fieldAllInstVars (in category 'fields') -----<br>
  fieldAllInstVars<br>
  <br>
         ^ (self newFieldForType: #all key: #allInstVars)<br>
                 name: self allInstVarsTranslated; emphasizeName;<br>
+                valueGetter: [:obj | obj longPrintString]; printValueAsIs;<br>
-                valueGetter: [:object | object longPrintString]; printValueAsIs;<br>
                 yourself!<br>
<br>
Item was changed:<br>
  ----- Method: Inspector>>fieldSelf (in category 'fields') -----<br>
  fieldSelf<br>
  <br>
         ^ (self newFieldForType: #self key: #self)<br>
                 name: 'self'; styleName: ((UserInterfaceTheme current get: #self for: #SHTextStylerST80) ifNil: [#()]);<br>
+                valueGetter: [:obj | obj];<br>
+                valueSetter: [:obj :value | self object: value]; "Switch to another object-under-inspection."<br>
-                valueGetter: [:object | object];<br>
-                valueSetter: [:object :value | self object: value]; "Switch to another object-under-inspection."<br>
                 yourself!<br>
<br>
Item was changed:<br>
  ----- Method: Inspector>>streamInstanceVariablesOn: (in category 'fields - streaming') -----<br>
  streamInstanceVariablesOn: aStream<br>
  <br>
         | attributesForInstVars |<br>
         attributesForInstVars :=  (UserInterfaceTheme current get: #instVar for: #SHTextStylerST80) ifNil: [#()].<br>
         <br>
         (self object perform: #class "do not inline send of #class, receiver could be a proxy") allInstVarNames withIndexDo: [:name :index |           
<br>
                 aStream nextPut: ((self newFieldForType: #instVar key: name)<br>
                         name: name; styleName: attributesForInstVars;<br>
+                        valueGetter: [:obj | obj instVarNamed: name];<br>
+                        valueSetter: [:obj :value | obj instVarNamed: name put: value];<br>
-                        valueGetter: [:object | object instVarNamed: name];<br>
-                        valueSetter: [:object :value | object instVarNamed: name put: value];<br>
                         yourself)].!<br>
<br>
<br>
</div>
</span></font>
</div>

<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>