Fix in Upvalue-Logic

This commit is contained in:
Michael Schimmel
2025-09-18 20:11:12 +02:00
parent 5f110e4408
commit d12c6c966c
12 changed files with 819 additions and 96 deletions
+3 -4
View File
@@ -65,7 +65,7 @@ function NativeCreateRecordSeries(const Args: TArray<TDataValue>): TDataValue;
var
jsonDef: string;
recordDef: TScalarRecordDefinition;
series: TScalarRecordSeries;
series: IRecordSeries;
begin
if (Length(Args) <> 1) or (Args[0].Kind <> vkText) then
raise EArgumentException.Create('CreateRecordSeries requires one string argument.');
@@ -162,7 +162,7 @@ begin
adr.Kind := akLocalOrParent;
adr.ScopeDepth := 0;
// Capture 'Self' (slot 0) for recursion.
// Capture 'Self' (slot 0) for recursion using the captured variable.
adr.SlotIndex := 0;
lambdaScope[adr] := closureValue;
@@ -279,8 +279,7 @@ begin
else
begin
var scalarKind := TScalar.StringToKind(def);
var scalarSeries := TScalarSeries.Create(scalarKind);
Result := TDataValue.FromSeries(scalarSeries);
Result := TDataValue.FromSeries(TScalarSeries.Create(scalarKind));
end;
end;