mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 16:21:34 +01:00
* don't allow static methods in Java interfaces
git-svn-id: branches/jvmbackend@18392 -
This commit is contained in:
parent
8f2aacfed5
commit
2d5a542984
@ -935,7 +935,8 @@ implementation
|
|||||||
if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR]) then
|
if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR]) then
|
||||||
Message(parser_e_procedure_or_function_expected);
|
Message(parser_e_procedure_or_function_expected);
|
||||||
|
|
||||||
if is_interface(current_structdef) then
|
if is_interface(current_structdef) or
|
||||||
|
is_javainterface(current_structdef) then
|
||||||
Message(parser_e_no_static_method_in_interfaces)
|
Message(parser_e_no_static_method_in_interfaces)
|
||||||
else
|
else
|
||||||
{ class methods are also allowed for Objective-C protocols }
|
{ class methods are also allowed for Objective-C protocols }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user