diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index f8bde54fc4..b0b281b3eb 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -1050,10 +1050,7 @@ implementation { If there are attribute-properties available, bind them to this object } - if assigned(rtti_attrs_def) then - begin - trtti_attribute_list.bind(rtti_attrs_def,tobjectdef(hdef).rtti_attribute_list); - end; + trtti_attribute_list.bind(rtti_attrs_def,tobjectdef(hdef).rtti_attribute_list); { In case of an objcclass, verify that all methods have a message name set. We only check this now, because message names can be set diff --git a/compiler/pdecobj.pas b/compiler/pdecobj.pas index 46c29a89f9..dab822402f 100644 --- a/compiler/pdecobj.pas +++ b/compiler/pdecobj.pas @@ -214,10 +214,7 @@ implementation Message(parser_e_enumerator_identifier_required); consume(_SEMICOLON); end; - if assigned(rtti_attrs_def) then - begin - trtti_attribute_list.bind(rtti_attrs_def,p.rtti_attribute_list); - end; + trtti_attribute_list.bind(rtti_attrs_def,p.rtti_attribute_list); { hint directives, these can be separated by semicolons here, that needs to be handled here with a loop (PFV) }