Refactoring browser bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Refactoring browser bug

Dmitry Zamotkin-4
Let's create two methods in any object:

myMethod1
^ #('a' 'b')

myMethod2
^ #('a'), ('b')

In the second method select #('a') and try #Refactoring>>Extract method.
There is "Index 2 is out of bounds" error.

I suppose StLiteralArrayNode>>equalTo:withMapping: method should include
size checking:
self contents size = anObject contents size ifFalse: [ ^ false ].

--
Dmitry Zamotkin


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser bug

Blair McGlashan-2
Dmitry

You wrote in message news:[hidden email]...

> Let's create two methods in any object:
>
> myMethod1
> ^ #('a' 'b')
>
> myMethod2
> ^ #('a'), ('b')
>
> In the second method select #('a') and try #Refactoring>>Extract method.
> There is "Index 2 is out of bounds" error.

Thanks for the report (#1307).

>
> I suppose StLiteralArrayNode>>equalTo:withMapping: method should include
> size checking:
> self contents size = anObject contents size ifFalse: [ ^ false ].

I'm inclined to agree with you and will pass on to John Brant.

Regards

Blair