mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 11:00:28 +02:00
* 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:
parent
eef06e9bc6
commit
b6a3d66224
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user