[Cuis-dev] Fix to ReturnNode>>isImplicitSelfReturnIn:

Hernan Wilkinson hernan.wilkinson at 10pines.com
Mon Oct 19 12:17:05 PDT 2020


Thank you Fernando.
Integrated in GitHub.

I wrote a few tests to verify the error and the fix. I would be nice next
time to provide that too.

Thanks!
Hernan.

On Thu, Oct 15, 2020 at 10:33 AM Fernando Gasperi Jabalera via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi all,
>
> I'm attaching a small fix to ReturnNode>>isImplicitSelfReturnIn: that I
> found while making some fixes to the IntroduceNullObject refactoring I've
> been working on. The problem with the previous code:
>
> ReturnNode>>isImplicitSelfReturnIn: aMethodNode
>
>   ^self isReturnSelf and: [ (aMethodNode encoder rawSourceRanges
> includesKey: expr) not ]
>
> is that expr is self, so it was returning false if self was referenced in
> other parts of the method body.
>
> Best,
> Fernando.
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20201019/bc79e6f9/attachment.htm>


More information about the Cuis-dev mailing list