Autocomplete with generics
Original Reporter info from Mantis: Blaazen @Blaazen
-
Reporter name: Vojtech Cihak
Original Reporter info from Mantis: Blaazen @Blaazen
- Reporter name: Vojtech Cihak
Description:
Autocomplete does not work inside the "with begin end" block.
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, FGL;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
TGList = class(specialize TFPGObjectList<TButton>)
end;
var
Form1: TForm1;
GList: TGList;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormClick(Sender: TObject);
begin
with GList[0] do
begin
Cancel:=True;
end;
end;
end.
The code is compilable.
Lazarus 1.1 r39980M FPC 2.7.1 x86_64-linux-qt
Steps to reproduce:
Start a new project (application)
CTRL+C and CTRL+V the code above.
Try CTRL+Space inside the "with begin .. end" block.
Messages says: unit1.pas(35,8) Error: expression type must be class or record type
but code is compilable with fpc 2.7.1
Mantis conversion info:
- Mantis ID: 23782
- OS: Linux
- OS Build: 64-bit
- Platform: amd64
- Version: 1.1 (SVN)
- Fixed in revision: r62470 (#29d750ae)
- Monitored by: » jefferywa (jefferywa)