Browse Source

* don't allow static methods in Java interfaces

git-svn-id: branches/jvmbackend@18392 -
Jonas Maebe 14 years ago
parent
commit
2d5a542984
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/pdecobj.pas

+ 2 - 1
compiler/pdecobj.pas

@@ -935,7 +935,8 @@ implementation
                 if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR]) then
                   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)
                 else
                   { class methods are also allowed for Objective-C protocols }