mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 15:49:26 +02:00
* Patch from Pascal Riekenberg to fix HasAggregate for functions
git-svn-id: trunk@37057 -
This commit is contained in:
parent
e325284160
commit
6e308feb60
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user