View Issue Details

IDProjectCategoryView StatusLast Update
0026085LazarusIDEpublic2014-04-28 12:30
ReporterVojtech Cihak Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformamd64OSLinux 
Product Version1.3 (SVN) 
Summary0026085: Refactoring - Unused Units does not work for generics.
DescriptionRefactoring - Unused Units... detects FGL as unused unit but code does not compile without it.
Steps To ReproduceCreate 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 InformationLazarus 1.3 r44818M FPC 2.7.1 x86_64-linux-qt
TagsNo tags attached.
Fixed in Revision44832
LazTarget-
Widgetset
Attached Files

Relationships

has duplicate 0026125 resolvedMaxim Ganetsky Find unused units gives incorrect unused unit with generic declarations 

Activities

Vojtech Cihak

2014-04-28 12:30

reporter   ~0074640

I tested with r.44833. Thanks for extremly fast resolving.

Issue History

Date Modified Username Field Change
2014-04-28 11:49 Vojtech Cihak New Issue
2014-04-28 12:20 Mattias Gaertner Fixed in Revision => 44832
2014-04-28 12:20 Mattias Gaertner LazTarget => -
2014-04-28 12:20 Mattias Gaertner Status new => resolved
2014-04-28 12:20 Mattias Gaertner Resolution open => fixed
2014-04-28 12:20 Mattias Gaertner Assigned To => Mattias Gaertner
2014-04-28 12:30 Vojtech Cihak Note Added: 0074640
2014-04-28 12:30 Vojtech Cihak Status resolved => closed
2014-05-07 22:22 Maxim Ganetsky Relationship added has duplicate 0026125