mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 11:19:14 +02:00
codetools: test for regression due to generic type fixes
git-svn-id: trunk@64980 -
This commit is contained in:
parent
ce93f694d9
commit
052438a840
@ -39,6 +39,7 @@ type
|
||||
procedure TestCompleteProperty_TypeGenericDelphi;
|
||||
procedure TestCompleteProperty_GenericObjFPC;
|
||||
procedure TestCompleteProperty_GenericDelphi;
|
||||
procedure TestCompleteVariableWithSpecializedType;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -816,6 +817,46 @@ begin
|
||||
'end.']);
|
||||
end;
|
||||
|
||||
procedure TTestCodeCompletion.TestCompleteVariableWithSpecializedType;
|
||||
begin
|
||||
Test('TestCompleteVariableWithSpecializedType (not fixed so far)',
|
||||
['program Project1;',
|
||||
'{$mode objfpc}{$H+}',
|
||||
'uses',
|
||||
' Generics.Collections;',
|
||||
'type',
|
||||
' generic TObjectList2<T> = class(specialize TObjectList<T>)',
|
||||
' end;',
|
||||
' TList = specialize TObjectList2<TObject>;',
|
||||
' TClass = class',
|
||||
' List: TList;',
|
||||
' end;',
|
||||
'var',
|
||||
' Base: TObject;',
|
||||
'begin',
|
||||
' List := TClass(Base).List;',
|
||||
'end.'],
|
||||
15,3,
|
||||
['program Project1;',
|
||||
'{$mode objfpc}{$H+}',
|
||||
'uses',
|
||||
' Generics.Collections;',
|
||||
'type',
|
||||
' generic TObjectList2<T> = class(specialize TObjectList<T>)',
|
||||
' end;',
|
||||
' TList = specialize TObjectList2<TObject>;',
|
||||
' TClass = class',
|
||||
' List: TList;',
|
||||
' end;',
|
||||
'var',
|
||||
' Base: TObject;',
|
||||
' List: TList;',
|
||||
'begin',
|
||||
' List := TClass(Base).List;',
|
||||
'end.']);
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
RegisterTests([TTestCodeCompletion]);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user