mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-05 13:37:47 +02:00
Fix for the procedure signature to have an parent object and the parameters share the same parent value.
This commit is contained in:
parent
74fbb1f24f
commit
a8d97d35e0
@ -243,7 +243,7 @@ type
|
||||
procedure LoadFlags;
|
||||
procedure LoadParameters;
|
||||
public
|
||||
constructor Create(const Signature: TProcedureSignature);
|
||||
constructor Create(const Parent: TRttiObject; const Signature: TProcedureSignature);
|
||||
|
||||
class function Invoke(const Instance: TValue; const Args: array of TValue): TValue;
|
||||
|
||||
@ -2227,7 +2227,7 @@ end;
|
||||
function TRttiMethod.GetProcedureSignature: TRttiProcedureSignature;
|
||||
begin
|
||||
if not Assigned(FProcedureSignature) then
|
||||
FProcedureSignature := TRttiProcedureSignature.Create(MethodTypeInfo.ProcSig);
|
||||
FProcedureSignature := TRttiProcedureSignature.Create(Self, MethodTypeInfo.ProcSig);
|
||||
|
||||
Result := FProcedureSignature;
|
||||
end;
|
||||
@ -2872,9 +2872,9 @@ end;
|
||||
|
||||
{ TRttiProcedureSignature }
|
||||
|
||||
constructor TRttiProcedureSignature.Create(const Signature: TProcedureSignature);
|
||||
constructor TRttiProcedureSignature.Create(const Parent: TRttiObject; const Signature: TProcedureSignature);
|
||||
begin
|
||||
inherited Create(nil, Signature);
|
||||
inherited Create(Parent, Signature);
|
||||
|
||||
FReturnType := Pool.GetType(Signature.ResultType);
|
||||
|
||||
@ -2927,7 +2927,7 @@ begin
|
||||
for A := Low(FParameters) to High(FParameters) do
|
||||
begin
|
||||
Param := MethodParams[A];
|
||||
RttiParam := TRttiParameter.Create(Self, Param);
|
||||
RttiParam := TRttiParameter.Create(Parent, Param);
|
||||
RttiParam.FName := Param.Name;
|
||||
RttiParam.FParamType := Pool.GetType(Param.TypeInfo);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user