[Lazarus] IDE "Rename identifier" misfeature

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] IDE "Rename identifier" misfeature

Free Pascal - Lazarus mailing list
Hello

ATSynEdit has such function
procedure TATSynRanges.DeleteFromLineIndexer(AIndex: integer);
var
   Ptr: PATSynRange;
   NItemLen, iLine, iItem, j: integer;
begin
   Ptr:= ItemPtr(AIndex);
   for iLine:= Ptr^.Y2 downto Ptr^.Y do
   begin
     ..
   end;
end;

when I do "Rename identifier" from Ptr to ItemPtr, IDE allows to do it,
and I have conflict with class method ItemPtr(), which is even called in
this function.

--
Regards,
Alexey Torgashin

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE "Rename identifier" misfeature

Free Pascal - Lazarus mailing list
Well, IDE doesn't check for conflicts. It's up to you!

Pascal

> "Alexey Tor. via lazarus" <[hidden email]> hat am 26. Mai 2020 um 00:25 geschrieben:
>
>
> Hello
>
> ATSynEdit has such function
> procedure TATSynRanges.DeleteFromLineIndexer(AIndex: integer);
> var
>    Ptr: PATSynRange;
>    NItemLen, iLine, iItem, j: integer;
> begin
>    Ptr:= ItemPtr(AIndex);
>    for iLine:= Ptr^.Y2 downto Ptr^.Y do
>    begin
>      ..
>    end;
> end;
>
> when I do "Rename identifier" from Ptr to ItemPtr, IDE allows to do it,
> and I have conflict with class method ItemPtr(), which is even called in
> this function.
>
> --
> Regards,
> Alexey Torgashin
>
> --
> _______________________________________________
> lazarus mailing list
> [hidden email]
> https://lists.lazarus-ide.org/listinfo/lazarus
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE "Rename identifier" misfeature

Free Pascal - Lazarus mailing list
On Tue, May 26, 2020 at 10:49 AM Pascal Riekenberg via lazarus
<[hidden email]> wrote:
> Well, IDE doesn't check for conflicts. It's up to you!

Actually it should check. There is also different pieces of code for
different rename functions behaving a little differently.
There are some related issues. See:
 https://bugs.freepascal.org/view.php?id=24275
 https://bugs.freepascal.org/view.php?id=33024

Juha
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus