mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 16:28:22 +02:00
* raise an exception if routine to be invoked isn't static, but there's no parameter to be used as Self
git-svn-id: trunk@37386 -
This commit is contained in:
parent
794eb7c122
commit
98bb449945
@ -341,6 +341,7 @@ resourcestring
|
||||
SErrCallConvNotSupported = 'Calling convention not supported: %s';
|
||||
SErrTypeKindNotSupported = 'Type kind is not supported: %s';
|
||||
SErrCallbackHandlerNil = 'Callback handler is Nil';
|
||||
SErrMissingSelfParam = 'Missing self parameter';
|
||||
|
||||
implementation
|
||||
|
||||
@ -545,10 +546,11 @@ begin
|
||||
if aIsConstructor then
|
||||
raise ENotImplemented.Create(SErrInvokeNotImplemented);
|
||||
|
||||
{ ToDo: what exactly is the purpose of IsStatic? }
|
||||
flags := [];
|
||||
if aIsStatic then
|
||||
Include(flags, fcfStatic);
|
||||
Include(flags, fcfStatic)
|
||||
else if Length(aArgs) = 0 then
|
||||
raise EInvocationError.Create(SErrMissingSelfParam);
|
||||
|
||||
SetLength(funcargs, Length(aArgs));
|
||||
for i := Low(aArgs) to High(aArgs) do begin
|
||||
|
Loading…
Reference in New Issue
Block a user