[Cuis-dev] Declaring Undeclared in Block with arguments fix

Eric Brandwein brandweineric at gmail.com
Mon Jan 27 15:39:34 PST 2020


Hi all,

I noticed that there's still a bug with the automatic declaration of
undeclared variables. In this case it is when saving a method with a block
that has arguments but not temporaries. For example, if one tries to save
this method:

method
    [ :arg | temp := 2. ^arg + temp].

and selects "declare block-local temp" in the PopupMenu that appears, a
Debugger pops up, because the resulting code is missing the temporary
declaration pipes like so:

method
    [ :arg temp | temp := 2. ^arg + temp].

Attached is a fix for this, and the corresponding tests. I hope this is the
last bug with this.

Cheers,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200127/e18cd200/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DeclareUndeclaredWithBlockArgumentsFix-BaseImageTests-EB.1.cs.st
Type: application/vnd.sailingtracker.track
Size: 1759 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200127/e18cd200/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4025-DeclareUndeclaredWithBlockArgumentsFix-EricBrandwein-2020Jan27-00h02m-EB.1.cs.st
Type: application/vnd.sailingtracker.track
Size: 6670 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200127/e18cd200/attachment-0001.bin>


More information about the Cuis-dev mailing list