mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:29:26 +02:00
fcl-passrc: fixed adding specialized type behind array
This commit is contained in:
parent
12405f9ee4
commit
d96f9b8059
@ -16917,7 +16917,7 @@ var
|
||||
Last:=TPasElement(List[i]);
|
||||
if Last is TPasGenericType then
|
||||
begin
|
||||
if (Last.CustomData<>nil) then
|
||||
if (Last.CustomData is TPasGenericScope) then
|
||||
begin
|
||||
GenScope:=Last.CustomData as TPasGenericScope;
|
||||
if GenScope.GenericStep>=psgsInterfaceParsed then
|
||||
|
@ -190,6 +190,7 @@ type
|
||||
procedure TestGenMethod_OverloadArgs;
|
||||
procedure TestGenMethod_TypeCastParam;
|
||||
procedure TestGenMethod_TypeCastIdentDot;
|
||||
procedure TestGenMethod_ParamProcVar_Forward_Issue39216;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -3118,6 +3119,26 @@ begin
|
||||
ParseUnit;
|
||||
end;
|
||||
|
||||
procedure TTestResolveGenerics.TestGenMethod_ParamProcVar_Forward_Issue39216;
|
||||
begin
|
||||
StartUnit(false);
|
||||
Add([
|
||||
'{$mode delphi}',
|
||||
'{$modeswitch externalclass}',
|
||||
'interface',
|
||||
'type',
|
||||
' TMyProc<T> = reference to procedure(Arg: T);',
|
||||
' TMyClass = class;',
|
||||
' TMyClassArray = array of TMyClass;',
|
||||
' TMyClass = class external name ''MyClass''',
|
||||
' public',
|
||||
' procedure MyProc<T>(MyProcVar: TMyProc<T>);',
|
||||
' end;',
|
||||
'implementation',
|
||||
'']);
|
||||
ParseUnit;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterTests([TTestResolveGenerics]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user