* Patch from Pascal Riekenberg to fix HasAggregate for functions

git-svn-id: trunk@37057 -
This commit is contained in:
michael 2017-08-25 07:54:07 +00:00
parent e325284160
commit 6e308feb60

View File

@ -567,6 +567,9 @@ Type
Procedure Check; override;
Constructor CreateFunction(AID : TFPExprIdentifierDef; Const Args : TExprArgumentArray); virtual;
Destructor Destroy; override;
Procedure InitAggregate; override;
Procedure UpdateAggregate; override;
Function HasAggregate : Boolean; override;
Property ArgumentNodes : TExprArgumentArray Read FArgumentNodes;
Property ArgumentParams : TExprParameterArray Read FArgumentParams;
Function AsString : String; override;
@ -3382,6 +3385,19 @@ begin
end;
end;
function TFPExprFunction.HasAggregate: Boolean;
var
I: Integer;
begin
Result := true;
if IsAggregate then
exit;
For I:=0 to Length(FArgumentNodes)-1 do
if FArgumentNodes[I].HasAggregate then
exit;
Result := false;
end;
procedure TFPExprFunction.Check;
Var
@ -3428,6 +3444,22 @@ begin
inherited Destroy;
end;
procedure TFPExprFunction.InitAggregate;
var
I: Integer;
begin
For I:=0 to Length(FArgumentNodes)-1 do
FArgumentNodes[i].InitAggregate;
end;
procedure TFPExprFunction.UpdateAggregate;
var
I: Integer;
begin
For I:=0 to Length(FArgumentNodes)-1 do
FArgumentNodes[i].UpdateAggregate;
end;
function TFPExprFunction.AsString: String;
Var