Refactoring - Unused Units does not work for generics.
Original Reporter info from Mantis: Blaazen @Blaazen
-
Reporter name: Vojtech Cihak
Original Reporter info from Mantis: Blaazen @Blaazen
- Reporter name: Vojtech Cihak
Description:
Refactoring - Unused Units... detects FGL as unused unit but code does not compile without it.
Steps to reproduce:
Create a new project and replace initial code with following.
Refactoring -> Unused Units... shows FGL as unused but code does not compile without it (when you comment the line with FGL).
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
//Classes,
//SysUtils,
FGL,
Forms;
type
TMyGList = specialize TFPGList<Integer>;
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
MGL: TMyGList;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
MGL:=TMyGList.Create;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
MGL.Free;
end;
end.
Additional information:
Lazarus 1.3 r44818M FPC 2.7.1 x86_64-linux-qt
Mantis conversion info:
- Mantis ID: 26085
- OS: Linux
- OS Build: Chakra 64-bit
- Build: 44818
- Platform: amd64
- Version: 1.3 (SVN)
- Fixed in revision: 44832 (#16ee2ad7)