fpc/tests/test/unest6a.pp
Jonas Maebe 2db4cae7aa nested procvars: support assignments when switch not active
Support assigning one nested procvar to another even when the nestedprocvars
modeswitch is not active. This can happen when the type was declared in a
different unit that was compiled with this modeswitch, or in internally
generated wrapper code (which uses "pure" objfpc mode)
2023-11-25 22:35:55 +01:00

27 lines
360 B
ObjectPascal

{$mode objfpc}
{$modeswitch nestedprocvars}
unit unest6a;
interface
type
TNestedProc = procedure is nested;
IInf = interface
procedure InfMethod(AParam: TNestedProc);
end;
TObj = class(TInterfacedObject, IInf)
procedure InfMethod(AParam: TNestedProc);
end;
implementation
procedure TObj.InfMethod(AParam: TNestedProc);
begin
aParam
end;
end.