mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 04:49:43 +02:00
codetools: added test for mode delphi generic proc inside normal record
git-svn-id: trunk@56507 -
This commit is contained in:
parent
c43215a213
commit
37c6ae0b00
@ -649,14 +649,14 @@ begin
|
||||
' integer = longint;',
|
||||
' TOwnedCollection = class',
|
||||
' end;',
|
||||
' generic TTMSFNCOwnedCollection<T: class> = class(TOwnedCollection)',
|
||||
' generic TMyOwnedCollection<T: class> = class(TOwnedCollection)',
|
||||
' public type',
|
||||
' TEnumerator = class',
|
||||
' private',
|
||||
' FIndex: Integer;',
|
||||
' FCol: specialize TTMSFNCOwnedCollection<T>;',
|
||||
' FCol: specialize TMyOwnedCollection<T>;',
|
||||
' public',
|
||||
' constructor Create(ACol: specialize TTMSFNCOwnedCollection<T>);',
|
||||
' constructor Create(ACol: specialize TMyOwnedCollection<T>);',
|
||||
' function GetCurrent: T;',
|
||||
' function MoveNext: Boolean;',
|
||||
' property Current: T read GetCurrent;',
|
||||
|
@ -93,7 +93,6 @@ var
|
||||
SrcMark: TFDMarker;
|
||||
CursorPos: TCodeXYPosition;
|
||||
CodeContexts: TCodeContextInfo;
|
||||
i: Integer;
|
||||
begin
|
||||
StartProgram;
|
||||
Add([
|
||||
|
@ -42,6 +42,7 @@ type
|
||||
procedure TestAtomRing;
|
||||
procedure TestRecord_ClassOperators;
|
||||
procedure TestDeprecated;
|
||||
procedure TestParseGenericsDelphi;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -333,6 +334,22 @@ begin
|
||||
ParseModule;
|
||||
end;
|
||||
|
||||
procedure TTestPascalParser.TestParseGenericsDelphi;
|
||||
begin
|
||||
StartProgram;
|
||||
Add([
|
||||
'{$mode delphi}',
|
||||
'type',
|
||||
' TRec = record',
|
||||
' procedure Proc<T>;', // generic proc inside normal record
|
||||
' end;',
|
||||
'procedure TRec.Proc<T>;',
|
||||
'begin',
|
||||
'end;',
|
||||
'begin']);
|
||||
ParseModule;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterTest(TTestPascalParser);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user