View Issue Details

IDProjectCategoryView StatusLast Update
0033788LazarusIDEpublic2020-03-05 11:58
Reporteravk Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformall 
Product Version1.9 (SVN) 
Summary0033788: codetools disabled (generics)
Descriptiongenerics specialization inside heritage list makes codetools disabled
Steps To Reproducejust try to declare something like

  TDescendant<TKey, TValue> = class(TAncestor<TPair<TKey, TValue>>);
Tagscodetools, generics
Fixed in Revisionr62693
LazTarget-
Widgetset
Attached Files

Relationships

has duplicate 0034824 resolvedMattias Gaertner Code navigation fails with generics 

Activities

avk

2018-05-25 10:22

reporter  

codetools_test.pas (1,519 bytes)

soerensen3

2020-03-04 21:23

reporter   ~0121381

As there is nobody monitoring the duplicate issue of this I write here, that I just submitted a patch for the duplicate issue that partly solves this issue. Only code completion for the function with a generic result is still broken but no error occurs while parsing.

https://bugs.freepascal.org/view.php?id=34824
fix-nested-generics-specialization.patch (816 bytes)   
Index: pascalparsertool.pas
===================================================================
--- components/codetools/pascalparsertool.pas	(revision 62333)
+++ components/codetools/pascalparsertool.pas	(working copy)
@@ -6052,7 +6052,8 @@
   repeat
     // read identifier (a parameter of the generic type)
     Next;
-    AtomIsIdentifierSaveE(20180411194303);
+    ReadTypeReference( CreateChildNodes );
+    {AtomIsIdentifierSaveE(20180411194303);
     if CreateChildNodes then begin
       CreateChildNode;
       CurNode.Desc:=ctnSpecializeParam;
@@ -6068,7 +6069,7 @@
       Next;
     end;
     if CreateChildNodes then
-      EndChildNode; // close ctnSpecializeParam
+      EndChildNode;} // close ctnSpecializeParam
     if AtomIsChar('>') then
       break
     else if CurPos.Flag=cafComma then begin

Juha Manninen

2020-03-05 11:58

developer   ~0121394

Resolved together with 0034824.

Issue History

Date Modified Username Field Change
2018-05-25 10:22 avk New Issue
2018-05-25 10:22 avk File Added: codetools_test.pas
2018-05-25 10:23 avk Tag Attached: codetools
2018-05-25 10:23 avk Tag Detached: codetools
2018-05-25 10:24 avk Tag Attached: codetools
2018-05-25 10:24 avk Tag Attached: generics
2018-05-25 10:28 Mattias Gaertner Assigned To => Mattias Gaertner
2018-05-25 10:28 Mattias Gaertner Status new => assigned
2018-05-25 10:30 Mattias Gaertner LazTarget => -
2018-05-25 10:30 Mattias Gaertner Summary codetools disabled => codetools disabled (generics)
2019-12-30 13:27 Juha Manninen Relationship added has duplicate 0034824
2020-03-04 21:23 soerensen3 File Added: fix-nested-generics-specialization.patch
2020-03-04 21:23 soerensen3 Note Added: 0121381
2020-03-05 11:57 Juha Manninen Assigned To Mattias Gaertner => Juha Manninen
2020-03-05 11:58 Juha Manninen Status assigned => resolved
2020-03-05 11:58 Juha Manninen Resolution open => fixed
2020-03-05 11:58 Juha Manninen Fixed in Revision => r62693
2020-03-05 11:58 Juha Manninen Note Added: 0121394