[Cuis-dev] Several bug fixes for ExtractMethod
Juan Vuletich
juan at cuis.st
Thu Sep 3 14:18:14 PDT 2026
Hi Joel,
All these are now at GitHub.
BTW, congratulations for the defense of your Masters Thesis!
Cheers,
On 2026-09-01 5:36 PM, Joel Camera via Cuis-dev wrote:
>
> Hello folks!
>
> Here are several bug fixes for |ExtractMethod|:
>
> 1. *Extracting a method when the receiver is a *|*LiteralVariableNode*|
> Trying to extract a method when the receiver is a
> |LiteralVariableNode| in the AST throws an exception. For example,
> if you want to extract |Smalltalk at: #MCPTestSubject|,
> |Smalltalk| is represented as a |LiteralVariableNode|.
> 2. *Extracting multiple assignments when equivalent code exists in
> another message*
> When extracting more than one assignment and equivalent code
> exists in another message, we were trying to add two assignment
> blocks to the new method.
> 3. *Using *|*methodNode*|*instead of *|*notOptimizedMethodNode*|
> We were using |methodNode| instead of |notOptimizedMethodNode|. As
> a result, we were finding some nodes that didn't have a source
> range in the method.
> 4. *Shadowing issue with instance variables*
> We had a shadowing issue when an instance variable was used as a
> parameter in the new message. The new message name input suggested
> the instance variable's name, which ended up causing a shadowing
> exception.
> 5. *Extracting code with an assignment and a non-local return*
> The last issue occurred when trying to extract code containing
> both an assignment and a non-local return. The extraction failed
> because of an incorrect validation.
>
> Have a nice day!
>
>
> Joel Cámera
>
>
> Agile Software Development
>
>
> Alem 896, Floor 6, Buenos Aires, Argentina
>
> +54 9 011 6091 3125
>
>
--
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260903/c37ce99b/attachment.htm>
More information about the Cuis-dev
mailing list