* adjust check for non-static class methods in class helpers in so far that only classes allow such methods (interfaces and objects would not either)

git-svn-id: trunk@36937 -
This commit is contained in:
svenbarth 2017-08-18 15:27:47 +00:00
parent eef06e9bc6
commit b6a3d66224

View File

@ -907,7 +907,10 @@ implementation
{ for record and type helpers only static class methods are
allowed }
if is_objectpascal_helper(astruct) and
(tobjectdef(astruct).extendeddef.typ<>objectdef) and
(
(tobjectdef(astruct).extendeddef.typ<>objectdef) or
(tobjectdef(tobjectdef(astruct).extendeddef).objecttype<>odt_class)
) and
is_classdef and not (po_staticmethod in result.procoptions) then
MessagePos(result.fileinfo,parser_e_class_methods_only_static_in_records);