View Issue Details

IDProjectCategoryView StatusLast Update
0023903LazarusIDEpublic2020-07-16 17:47
Reportersilvioprog Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.0.7 (SVN) 
Summary0023903: Complete code error
DescriptionThe complete code can't auto declare a variable of a generic class. See steps to reproduce below.
Steps To ReproducePut this code in your unit:

TObjects = specialize TFPGList<TObject>;

After, implement this code:

procedure TFoo.MyProcedure;
begin
  VObjects := TObjects.Create;
end;

Move the cursor position after VObjects (e.g.: VObjects| ) and try to complete (Shift+Ctrl+C), it will generate this code:

procedure TFoo.MyProcedure;
var
  VObjects: generic;
begin
  VObjects := TObjects.Create;
end;

But the correct code would be:

procedure TFoo.MyProcedure;
var
  VObjects: TObjects;
begin
  VObjects := TObjects.Create;
end;

Thanks.
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Relationships

related to 0032018 resolvedMattias Gaertner Lazarus codetool stops working if 'specialize' keyword is used in function/procedure definition 
related to 0029860 assignedMattias Gaertner Lazarus SmartHint does not work for generic specialized types 
has duplicate 0031408 resolvedJuha Manninen Lazarus Generic class IDE interaction needs fixing 
has duplicate 0031939 closedMattias Gaertner Lazarus codetools has poblems with "function GetNodeData<T>(pNode: PVirtualNode): T; overload; inline;" 
has duplicate 0035083 new Lazarus IDE Ctrl+Shift+C wrong with generics 
related to 0025927 feedbackMattias Gaertner Lazarus Generic Type declared inside class after methods stops find declaration 
related to 0023782 resolvedJuha Manninen Lazarus Autocomplete with generics 
related to 0025613 confirmedMattias Gaertner Lazarus Code completion broken/block for generic specialization type inside generic type 
related to 0025615 resolvedMattias Gaertner Lazarus "Complete Code" don't work correctly for method that return generic type (delphi mode) 
related to 0025617 resolvedMattias Gaertner Lazarus "Complete Code" don't work correctly for method that contain parameter with generic type (delphi mode) 
related to 0025619 resolvedMattias Gaertner Lazarus "Complete Code" broken/blocked for property with generic type (delphi mode) 
related to 0025595 confirmedMattias Gaertner Lazarus Code completion don't work for generic constructors (delphi mode) 
related to 0027847 resolvedJuha Manninen Packages CodeTools see generics as an error 
related to 0028989 assignedPascal Riekenberg Lazarus Code completion can not resolve generic types used in nested classes/objects/records 
related to 0029094 resolvedMattias Gaertner Lazarus Codetools fail with generic function 
related to 0029163 resolvedMattias Gaertner Lazarus codecompletion stumbles on generics construct 
related to 0030227 resolvedMattias Gaertner Lazarus code completion doesn't work with generics 
related to 0031944 closedMattias Gaertner Lazarus Codetools: a semicolon (;) is inserted after "specialize" when using Codecompletion on generics 
related to 0032291 resolvedMattias Gaertner Lazarus IDE doesn't work properly when generics are used in the code - in delphi/delphiunicode mode 
related to 0032252 assignedMattias Gaertner Lazarus Codetools error: cycle detected 
related to 0029785 resolvedMattias Gaertner Lazarus Code Completion breaks with Generics 
related to 0030271 resolvedMattias Gaertner Lazarus Codecompletion fails on generic class in delphi mode 
related to 0035082 resolvedJuha Manninen Lazarus IDE Go to definition wrong with generics 
related to 0034824 resolvedMattias Gaertner Lazarus Code navigation fails with generics 

Activities

Pascal Riekenberg

2020-04-28 12:45

developer   ~0122490

This is fixed. Please close.

delfion

2020-04-28 15:36

reporter   ~0122498

I get same result as before: VObjects: generic;
Revision 63089

Issue History

Date Modified Username Field Change
2013-02-17 02:45 silvioprog New Issue
2013-02-17 09:13 Mattias Gaertner Assigned To => Mattias Gaertner
2013-02-17 09:13 Mattias Gaertner Status new => assigned
2015-12-10 15:12 Mattias Gaertner Relationship added related to 0025927
2015-12-10 15:12 Mattias Gaertner Relationship added related to 0023782
2015-12-10 15:13 Mattias Gaertner Relationship added related to 0025613
2015-12-10 15:13 Mattias Gaertner Relationship added related to 0025615
2015-12-10 15:13 Mattias Gaertner Relationship added related to 0025617
2015-12-10 15:13 Mattias Gaertner Relationship added related to 0025619
2015-12-10 15:13 Mattias Gaertner Relationship added related to 0025595
2015-12-10 15:14 Mattias Gaertner Relationship added related to 0027847
2015-12-10 15:14 Mattias Gaertner Relationship added related to 0028989
2015-12-10 15:14 Mattias Gaertner Relationship added related to 0029094
2015-12-10 15:15 Mattias Gaertner Relationship added related to 0029163
2016-06-02 17:36 Juha Manninen Relationship added related to 0030227
2017-02-17 21:27 Juha Manninen Relationship added related to 0031408
2017-06-01 18:07 Juha Manninen Relationship added related to 0031944
2017-08-19 17:40 Juha Manninen Relationship added related to 0032291
2017-08-20 11:00 Juha Manninen Relationship added related to 0032252
2017-08-30 14:10 Juha Manninen Relationship added related to 0029785
2017-08-30 14:13 Juha Manninen Relationship added related to 0030271
2017-10-09 15:36 Juha Manninen Relationship added related to 0032018
2017-10-10 17:21 Juha Manninen Relationship replaced has duplicate 0031408
2017-10-10 21:28 Juha Manninen Relationship added related to 0029860
2017-10-10 21:35 Juha Manninen Relationship added has duplicate 0031939
2019-02-14 13:58 Juha Manninen Relationship added has duplicate 0035083
2019-02-14 13:58 Juha Manninen Relationship added related to 0035082
2019-12-30 12:45 Juha Manninen Relationship added related to 0034824
2020-04-28 12:45 Pascal Riekenberg Note Added: 0122490
2020-04-28 14:16 Mattias Gaertner Status assigned => resolved
2020-04-28 14:16 Mattias Gaertner Resolution open => fixed
2020-04-28 14:16 Mattias Gaertner LazTarget => -
2020-04-28 15:36 delfion Note Added: 0122498
2020-07-16 17:47 silvioprog Status resolved => closed