View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0028989||Lazarus||IDE||public||2015-11-10 16:32||2020-07-30 09:32|
|Reporter||Julian Puhl||Assigned To||Pascal Riekenberg|
|Product Version||1.5 (SVN)|
|Summary||0028989: Code completion can not resolve generic types used in nested classes/objects/records|
T3 = record
generic T1<T> = object
type T2 = record
TTest1 = specialize T1<T3>;
testing.TestVar1.; //CTRL-Space shows Var1 and Var2
testing2.TestVar2.; //CTRL-Space shows error: illegal qualifier . found
|Tags||No tags attached.|
|Fixed in Revision|
||I've done some debugging and it seems that it fails because GenParams.SpecializeParamsNode is nil when calling TFindDeclarationParams.FindGenericParamType. For TestVar1 this is not the case. I did not debug any further for now.|
It has been some time by now. For now we work around the bug with not using nested types plus casting variables to external types when necessary. Basically this means extra code so that the completion works.
How difficult is this problem to fix and do you plan to fix it at some point? Maybe you can point me in the right direction to what has to be done and I can try to fix it. I did try it once but got only mixed results plus the cache did break it often.
AFAIK Ondrej Pokorny implemented the current generics search in codetools.
You can ask him on the list or the forum.
||Is this still valid?|
||Yes, it is.|
|2015-11-10 16:32||Julian Puhl||New Issue|
|2015-11-10 17:05||Mattias Gaertner||Assigned To||=> Mattias Gaertner|
|2015-11-10 17:05||Mattias Gaertner||Status||new => assigned|
|2015-11-11 16:12||Julian Puhl||Note Added: 0087235|
|2015-12-10 15:14||Mattias Gaertner||Relationship added||related to 0023903|
|2017-04-25 10:48||Julian Puhl||Note Added: 0099906|
|2017-04-25 11:18||Mattias Gaertner||Note Added: 0099910|
|2020-05-11 16:28||Juha Manninen||Relationship added||related to 0036981|
|2020-05-11 16:29||Juha Manninen||Note Added: 0122715|
|2020-05-11 21:42||Pascal Riekenberg||Note Added: 0122718|
|2020-07-30 09:32||Pascal Riekenberg||Assigned To||Mattias Gaertner => Pascal Riekenberg|