Local Type and generics (T in record)
Summary
Symbol T cannot be used inside local record type (i.e. type record declared in a method)
System Information
Chakra Linux x86-64, Lazarus 2.3.0 (rev main-2_3-2505-g96291eb9a5) FPC 3.3.1 x86_64-linux-qt
Steps to reproduce
Try to compile attached file project1.lpr
Example Project
{$mode objfpc}
program project1;
{$R *.res}
type
{ TGenClass }
generic TGenClass<T> = class
procedure DoSomething;
end;
{ TGenClass }
procedure TGenClass.DoSomething;
type
TLocalRec1 = record
Item: T;
end;
TLocalRec2 = record
Item: TGenClass.T;
end;
TLocalT = T;
TLocalRec3 = record
Item: TLocalT;
end;
begin
end;
begin
end.
What is the current bug behavior?
Does not compile