mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 17:41:31 +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;',
|
' integer = longint;',
|
||||||
' TOwnedCollection = class',
|
' TOwnedCollection = class',
|
||||||
' end;',
|
' end;',
|
||||||
' generic TTMSFNCOwnedCollection<T: class> = class(TOwnedCollection)',
|
' generic TMyOwnedCollection<T: class> = class(TOwnedCollection)',
|
||||||
' public type',
|
' public type',
|
||||||
' TEnumerator = class',
|
' TEnumerator = class',
|
||||||
' private',
|
' private',
|
||||||
' FIndex: Integer;',
|
' FIndex: Integer;',
|
||||||
' FCol: specialize TTMSFNCOwnedCollection<T>;',
|
' FCol: specialize TMyOwnedCollection<T>;',
|
||||||
' public',
|
' public',
|
||||||
' constructor Create(ACol: specialize TTMSFNCOwnedCollection<T>);',
|
' constructor Create(ACol: specialize TMyOwnedCollection<T>);',
|
||||||
' function GetCurrent: T;',
|
' function GetCurrent: T;',
|
||||||
' function MoveNext: Boolean;',
|
' function MoveNext: Boolean;',
|
||||||
' property Current: T read GetCurrent;',
|
' property Current: T read GetCurrent;',
|
||||||
|
@ -93,7 +93,6 @@ var
|
|||||||
SrcMark: TFDMarker;
|
SrcMark: TFDMarker;
|
||||||
CursorPos: TCodeXYPosition;
|
CursorPos: TCodeXYPosition;
|
||||||
CodeContexts: TCodeContextInfo;
|
CodeContexts: TCodeContextInfo;
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
StartProgram;
|
StartProgram;
|
||||||
Add([
|
Add([
|
||||||
|
@ -42,6 +42,7 @@ type
|
|||||||
procedure TestAtomRing;
|
procedure TestAtomRing;
|
||||||
procedure TestRecord_ClassOperators;
|
procedure TestRecord_ClassOperators;
|
||||||
procedure TestDeprecated;
|
procedure TestDeprecated;
|
||||||
|
procedure TestParseGenericsDelphi;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -333,6 +334,22 @@ begin
|
|||||||
ParseModule;
|
ParseModule;
|
||||||
end;
|
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
|
initialization
|
||||||
RegisterTest(TTestPascalParser);
|
RegisterTest(TTestPascalParser);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user