mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 11:09:47 +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';
|
SErrCallConvNotSupported = 'Calling convention not supported: %s';
|
||||||
SErrTypeKindNotSupported = 'Type kind is not supported: %s';
|
SErrTypeKindNotSupported = 'Type kind is not supported: %s';
|
||||||
SErrCallbackHandlerNil = 'Callback handler is Nil';
|
SErrCallbackHandlerNil = 'Callback handler is Nil';
|
||||||
|
SErrMissingSelfParam = 'Missing self parameter';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -545,10 +546,11 @@ begin
|
|||||||
if aIsConstructor then
|
if aIsConstructor then
|
||||||
raise ENotImplemented.Create(SErrInvokeNotImplemented);
|
raise ENotImplemented.Create(SErrInvokeNotImplemented);
|
||||||
|
|
||||||
{ ToDo: what exactly is the purpose of IsStatic? }
|
|
||||||
flags := [];
|
flags := [];
|
||||||
if aIsStatic then
|
if aIsStatic then
|
||||||
Include(flags, fcfStatic);
|
Include(flags, fcfStatic)
|
||||||
|
else if Length(aArgs) = 0 then
|
||||||
|
raise EInvocationError.Create(SErrMissingSelfParam);
|
||||||
|
|
||||||
SetLength(funcargs, Length(aArgs));
|
SetLength(funcargs, Length(aArgs));
|
||||||
for i := Low(aArgs) to High(aArgs) do begin
|
for i := Low(aArgs) to High(aArgs) do begin
|
||||||
|
Loading…
Reference in New Issue
Block a user