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

Juan Vuletich juan at jvuletich.org
Wed Feb 19 08:06:30 PST 2020


On 1/27/2020 8:39 PM, Eric Brandwein via Cuis-dev wrote:
> 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

Integrated, thanks!

Not included your Prueba class, though :P

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list