[Lazarus] A big thank you!

Anthony Walter sysrpl at gmail.com
Wed Nov 4 20:12:26 CET 2015


Ondrej, do you think you could look at this CodeTools issue which has been
sitting around for a while?

http://mantis.freepascal.org/view.php?id=27847

Basically what happens is you can define a type which refers to itself
"type IBitmap = interface(ICloneable<IBitmap>)". If you ever try to use
code insight (Ctrl+ Space after a dot) on that type, CodeTools jumps out of
whatever file you're in and takes you to the definition of what it thinks
is a bad type. A red error is put into the messages window.

procedure TForm1.Button1Click(Sender: TObject);
begin
  FBitmap. // Press [Ctrl + Space] after the dot and CodeTools takes you
out of this file
  // .. more code
end;
*Red error in the message window* clonebug.pas(13,34) Error: identifier not
found: IBitmap

And here is an example of a file which offends CodeTools:

unit CloneBug;

{$mode delphi}

interface

type
  ICloneable<T> = interface
  ['{2C3BA33B-97E5-485C-B765-462B575A1011}']
    function Clone: T;
  end;

  IBitmap = interface(ICloneable<IBitmap>) // CodeTools takes you here with
an error message
    function Clone: IBitmap;
    procedure Draw;
  end;

implementation

end.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151104/92d56e31/attachment-0003.html>


More information about the Lazarus mailing list