Browse Source

* Do not show a false warning about the result of a TCustomAttribute

git-svn-id: branches/joost/classattributes@24671 -
joost 12 years ago
parent
commit
d79916d3e1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/symtable.pas

+ 3 - 1
compiler/symtable.pas

@@ -673,9 +673,11 @@ implementation
                  if (vo_is_funcret in tabstractvarsym(sym).varoptions) then
                    begin
                      { don't warn about the result of constructors }
+                     { or the synthetic helper functions for class-attributes }
                      if ((tsym(sym).owner.symtabletype<>localsymtable) or
                         (tprocdef(tsym(sym).owner.defowner).proctypeoption<>potype_constructor)) and
-                        not(cs_opt_nodedfa in current_settings.optimizerswitches) then
+                        not(cs_opt_nodedfa in current_settings.optimizerswitches) and
+                        (tprocdef(tsym(sym).owner.defowner).synthetickind <> tsk_get_rttiattribute) then
                        MessagePos(tsym(sym).fileinfo,sym_w_function_result_not_set)
                    end
                  else if (tsym(sym).owner.symtabletype=parasymtable) then