|
@@ -5847,6 +5847,8 @@ var
|
|
|
ObjKind: TPasObjKind;
|
|
|
ParentBody: TProcedureBody;
|
|
|
HelperForType: TPasType;
|
|
|
+ Args: TFPList;
|
|
|
+ Arg: TPasArgument;
|
|
|
begin
|
|
|
if El.Parent is TPasProcedure then
|
|
|
Proc:=TPasProcedure(El.Parent)
|
|
@@ -6046,10 +6048,28 @@ begin
|
|
|
if El is TPasFunctionType then
|
|
|
EmitTypeHints(TPasFunctionType(El).ResultEl,TPasFunctionType(El).ResultEl.ResultType);
|
|
|
|
|
|
+ if Proc.PublicName<>nil then
|
|
|
+ ResolveExpr(Proc.PublicName,rraRead);
|
|
|
if Proc.LibraryExpr<>nil then
|
|
|
ResolveExpr(Proc.LibraryExpr,rraRead);
|
|
|
if Proc.LibrarySymbolName<>nil then
|
|
|
ResolveExpr(Proc.LibrarySymbolName,rraRead);
|
|
|
+ if Proc.DispIDExpr<>nil then
|
|
|
+ ResolveExpr(Proc.DispIDExpr,rraRead);
|
|
|
+ if Proc.MessageExpr<>nil then
|
|
|
+ begin
|
|
|
+ // message modifier
|
|
|
+ ResolveExpr(Proc.MessageExpr,rraRead);
|
|
|
+ Args:=Proc.ProcType.Args;
|
|
|
+ if Args.Count<>1 then
|
|
|
+ RaiseMsg(20190303223701,nMessageHandlersInvalidParams,sMessageHandlersInvalidParams,[],El);
|
|
|
+ Arg:=TPasArgument(Args[0]);
|
|
|
+ if not (Arg.Access in [argVar,argOut]) then
|
|
|
+ RaiseMsg(20190303223834,nMessageHandlersInvalidParams,sMessageHandlersInvalidParams,[],El);
|
|
|
+ if (Proc.ClassType<>TPasProcedure)
|
|
|
+ and (Proc.ClassType<>TPasFunction) then
|
|
|
+ RaiseMsg(20190303224128,nXExpectedButYFound,sXExpectedButYFound,['procedure name(var Msg);message id;',GetElementTypeName(El)],El);
|
|
|
+ end;
|
|
|
|
|
|
if Proc.Parent is TPasMembersType then
|
|
|
begin
|