mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 02:26:20 +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]);
|
Last:=TPasElement(List[i]);
|
||||||
if Last is TPasGenericType then
|
if Last is TPasGenericType then
|
||||||
begin
|
begin
|
||||||
if (Last.CustomData<>nil) then
|
if (Last.CustomData is TPasGenericScope) then
|
||||||
begin
|
begin
|
||||||
GenScope:=Last.CustomData as TPasGenericScope;
|
GenScope:=Last.CustomData as TPasGenericScope;
|
||||||
if GenScope.GenericStep>=psgsInterfaceParsed then
|
if GenScope.GenericStep>=psgsInterfaceParsed then
|
||||||
|
@ -190,6 +190,7 @@ type
|
|||||||
procedure TestGenMethod_OverloadArgs;
|
procedure TestGenMethod_OverloadArgs;
|
||||||
procedure TestGenMethod_TypeCastParam;
|
procedure TestGenMethod_TypeCastParam;
|
||||||
procedure TestGenMethod_TypeCastIdentDot;
|
procedure TestGenMethod_TypeCastIdentDot;
|
||||||
|
procedure TestGenMethod_ParamProcVar_Forward_Issue39216;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -3118,6 +3119,26 @@ begin
|
|||||||
ParseUnit;
|
ParseUnit;
|
||||||
end;
|
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
|
initialization
|
||||||
RegisterTests([TTestResolveGenerics]);
|
RegisterTests([TTestResolveGenerics]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user