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

Fernando Gasperi Jabalera fgasperijabalera at gmail.com
Mon Oct 19 17:36:13 PDT 2020


Great, thanks!

I'll include the tests the next time, my bad!

Best,
Fernando.

On Mon, Oct 19, 2020 at 4:17 PM Hernan Wilkinson <
hernan.wilkinson at 10pines.com> wrote:

> 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/fe4a4264/attachment.htm>


More information about the Cuis-dev mailing list